I thought that was done with the exclamation (!) in !hlp->...?
} else if ((!hlp->double_cr_end && (t = strchr(srv->buf, '\n')))
^^^
James
-----Original Message-----
From: Henrik Nordstrom [mailto:hno@squid-cache.org]
Sent: Wednesday, 18 May 2005 2:00 a.m.
To: Beamish-White, James, VF-NZ
Cc: Squid Developers
Subject: RE: Modifying User-Agent
On Tue, 17 May 2005, Beamish-White, James, VF-NZ wrote:
> Attached is the patch (generated from diff -Naur).
>
>
> The main changes are made in HttpHeaderTools.c, but the error I am
> getting is:
>
> helperHandleRead: unexpected read from header_rewriter #1, 161 bytes
>
> ...which is debug in the helper.c file.
This indicates there was data received from the helper when none were
expected. May be related to the problem below...
>> there's an error when it does work, and if I also include the
>> redirect_program directive in the squid.conf (a requirement), it
>> hangs without response.
this looks to be due to the following change in helper.c which
unintentionally breaks the normal style helpers, and probably is
unreliable for the header style helpers..
+ } else if ((hlp->double_cr_end && (t = strchr(srv->buf, '\n')))
||
+ (hlp->double_cr_end && (t = strstr(srv->buf,
"\r\n\r\n")))
+ ) { /* end of reply found */
+ debug(84, 3) ("helperHandleRead: end of reply found\n");
+ if( strstr(srv->buf, "\r\n\r\n") )
The first condition needs to be negated (if NOT double_cr_end ...)
} else if ((!hlp->double_cr_end && (t = strchr(srv->buf,
'\n')))
||
^^^
Regards
Henrik
-----------------------------------------------------------------------------------------------
Have you seen our website?.... http://www.vodafone.co.nz
Manage Your Account, check your Vodafone Mail and send web2TXT online: http://www.vodafone.co.nz/myvodafone
CAUTION: This correspondence is confidential and intended for the named recipient(s) only.
If you are not the named recipient and receive this correspondence in error, you must not copy,
distribute or take any action in reliance on it and you should delete it from your system and
notify the sender immediately. Thank you.
Unless otherwise stated, any views or opinions expressed are solely those of the author and do
not represent those of Vodafone New Zealand Limited.
Vodafone New Zealand Limited
20 Viaduct Harbour Avenue, Private Bag 92161, Auckland 1030
Telephone + 64 9 355 2000
Facsimile + 64 9 355 2001
Received on Tue May 17 2005 - 15:00:04 MDT
This archive was generated by hypermail pre-2.1.9 : Tue May 31 2005 - 12:00:03 MDT