<div dir="ltr">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:<div><br></div><div><a rel="nofollow noreferrer" href="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" class="m_7950423229863086048m_-6867433478352448924gmail-Xx" dir="ltr" style="unicode-bidi:isolate;color:rgb(38,50,56);font-family:roboto,arial,sans-serif;font-size:13px" target="_blank">http://bugs.squid-cache.org/sh<wbr>ow_bug.cgi?id=4492</a><span style="color:rgb(38,50,56);font-family:roboto,arial,sans-serif;font-size:13px"> </span><br></div><div><br></div><div>Alex has created a patch that fixes the issue.</div><div><br></div><div>Thank you,</div><div>-Masha</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 1, 2017 at 4:37 PM, Alex Rousskov <span dir="ltr"><<a href="mailto:rousskov@measurement-factory.com" target="_blank">rousskov@measurement-factory.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 05/01/2017 04:12 PM, Masha Lifshin wrote:<br>
<br>
> when I turn on icap, squid shuts down the connection early,<br>
> without returning the body of the response. It seems it cannot read the<br>
> content length header and that messes up both squid and icap.<br>
<br>
</span><span>> 2017/04/28 08:11:47.297 kid1| 55,2| HttpHeader.cc(1483)<br>
> httpHeaderNoteParsedEntry: cannot parse hdr field: 'Content-Length: 606'<br>
<br>
<br>
</span>These "cannot parse hdr field" lines is a sign of a minor accounting bug<br>
(fixed in the latest Squid; v5 r15019). Do not worry about it -- it does<br>
not affect Squid behavior beyond header statistics reporting.<br>
<span><br>
<br>
> 2017/04/28 08:11:47.576 kid1| 93,3|<br>
</span><span>> Adaptation::Icap::Xaction::not<wbr>eCommRead threw exception: garbage<br>
> instead of CRLF line terminator<br>
<br>
</span>This exception can explain your symptoms: Squid failed to parse some<br>
portion of the ICAP response from your ICAP server. This is either a<br>
Squid bug or an ICAP server bug.<br>
<br>
Please make sure your Squid v4 contains a fix for bug #4551:<br>
<br>
<a href="http://bugs.squid-cache.org/show_bug.cgi?id=4551" rel="noreferrer" target="_blank">http://bugs.squid-cache.org/sh<wbr>ow_bug.cgi?id=4551</a><br>
<br>
Squid v4.0.13 and newer should have that fix. If your Squid is v4.0.17<br>
then bug #4551 should be fixed, but perhaps there is another bug OR the<br>
ICAP server itself is misbehaving.<br>
<span><br>
<br>
> Or is there some disconnect about the 206 code from icap?<br>
<br>
</span>The posted logs do not show enough info for me to pinpoint the problem.<br>
Try replacing "93,3" with "93,9 74,9" in your debug_options. Is that<br>
enough to get the ICAP server response logged? (I do not remember the<br>
minimum set of debug_options necessary to accomplish that.) If you post<br>
a new log, please attach (or post a link to) it instead of quoting it in<br>
the email because email formatting often screws up important details.<br>
<br>
Alternatively, post a pcap-format capture of TCP packets between Squid<br>
and ICAP server (but be careful with what you share on the list).<br>
<br>
<br>
Cheers,<br>
<br>
Alex.<br>
<br>
<br>
</blockquote></div><br></div></div>