[squid-users] Re: Squid w/ ICAP 204s

From: Lisa Fowler <lisa.fowler_at_gmail.com>
Date: Fri, 5 Dec 2008 14:09:18 -0800

Resolved, thanks to Christos via squid-dev.

Bug is in the ICAP server implementation, not in Squid. The ICAP
server cannot *only* respond with 204s as it must echo the messages
when required by the ICAP client, per the RFC.

Lisa

On Thu, Dec 4, 2008 at 1:06 PM, Lisa Fowler <lisa.fowler_at_gmail.com> wrote:
> Hello-
>
> I've searched through the archives and can't find anything pertaining
> to this problem, so I hope that someone can help with this.
>
> I have a Squid 3.0 installation (a build from November) with the ICAP
> client running, intercepting responses precache, which then forwards
> the entire responses to the ICAP server. I have a simple Python ICAP
> server that does nothing but respond to OPTIONS and sends back 204s
> otherwise. Preview is not enabled.
>
> For *most* webpages, this works fine (e.g. http://www.google.com
> http://www.mozilla.org), and the webpage is forwarded and all content
> is rendered properly on the web client.
>
> For certain webpages (e.g. http://www.mozillazine.org), the ICAP
> server receives the content, responds with the 204 as usual, but then
> the client never receives webpage and thus renders a blank page.
>
> Looking under the hood, Squid deterministically fails in
> ICAPModXact::virginContentSize() at the Must(virginConsumed <= start
> && start <= end) line.
>
> I'm deep in the murky waters of debugging, and it seems that there's a
> quirk in whether or not virginConsumed is reset to 0, such that I get
> a failure on the above Must assertion, for example (36033 <= 0 && 0 <=
> 36033) . I wonder if it's related to how
> virgin.body_pipe->buf().contentSize() is handled in the case of
> virginBodySending, such that in ICAPModXact::echoMore(), sizeMax is 0,
> and thus virginBodySending.progress(size) is never called... In the
> cases that *do* work, virginBodySending.progress(size) is called, but
> not in the cases that fail. The cases that fail have contentSize
> zeroed out (because virginBodySending.progress(size) is not called)...
>
> Any ideas/experience/advice?
>
> Thanks,
> Lisa
>
Received on Fri Dec 05 2008 - 22:09:27 MST

This archive was generated by hypermail 2.2.0 : Sat Dec 06 2008 - 12:00:01 MST