[squid-users] Squid cannot parse Content-Length header value and closes connection before sending body?
Masha Lifshin
mlifshin at phantomdesign.com
Wed May 10 19:39:35 UTC 2017
Thank you very much for your reply and subsequent work on this issue. For
those who run into similar issues, the cause is the following bug:
http://bugs.squid-cache.org/show_bug.cgi?id=4492
<http://www.google.com/url?q=http%3A%2F%2Fbugs.squid-cache.org%2Fshow_bug.cgi%3Fid%3D4492&sa=D&sntz=1&usg=AFQjCNHxLMMy7H9BCp8Cu4-yItJLHWQ1zg>
Alex has created a patch that fixes the issue.
Thank you,
-Masha
On Mon, May 1, 2017 at 4:37 PM, Alex Rousskov <rousskov at measurement-factory.
com> wrote:
> On 05/01/2017 04:12 PM, Masha Lifshin wrote:
>
> > when I turn on icap, squid shuts down the connection early,
> > without returning the body of the response. It seems it cannot read the
> > content length header and that messes up both squid and icap.
>
> > 2017/04/28 08:11:47.297 kid1| 55,2| HttpHeader.cc(1483)
> > httpHeaderNoteParsedEntry: cannot parse hdr field: 'Content-Length: 606'
>
>
> These "cannot parse hdr field" lines is a sign of a minor accounting bug
> (fixed in the latest Squid; v5 r15019). Do not worry about it -- it does
> not affect Squid behavior beyond header statistics reporting.
>
>
> > 2017/04/28 08:11:47.576 kid1| 93,3|
> > Adaptation::Icap::Xaction::noteCommRead threw exception: garbage
> > instead of CRLF line terminator
>
> This exception can explain your symptoms: Squid failed to parse some
> portion of the ICAP response from your ICAP server. This is either a
> Squid bug or an ICAP server bug.
>
> Please make sure your Squid v4 contains a fix for bug #4551:
>
> http://bugs.squid-cache.org/show_bug.cgi?id=4551
>
> Squid v4.0.13 and newer should have that fix. If your Squid is v4.0.17
> then bug #4551 should be fixed, but perhaps there is another bug OR the
> ICAP server itself is misbehaving.
>
>
> > Or is there some disconnect about the 206 code from icap?
>
> The posted logs do not show enough info for me to pinpoint the problem.
> Try replacing "93,3" with "93,9 74,9" in your debug_options. Is that
> enough to get the ICAP server response logged? (I do not remember the
> minimum set of debug_options necessary to accomplish that.) If you post
> a new log, please attach (or post a link to) it instead of quoting it in
> the email because email formatting often screws up important details.
>
> Alternatively, post a pcap-format capture of TCP packets between Squid
> and ICAP server (but be careful with what you share on the list).
>
>
> Cheers,
>
> Alex.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20170510/2aed7f00/attachment.html>
More information about the squid-users
mailing list