Re: squid-3 icap related patch

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Tue, 03 Oct 2006 10:12:13 -0600

On Tue, 2006-10-03 at 08:48 -0600, Alex Rousskov wrote:
> On Tue, 2006-10-03 at 11:36 +0300, Tsantilas Christos wrote:
>
> > I believe that the problem here is not the zero sized content.
> > Squid calls this function when read all headers.
> > There are cases in which squids did not read any part of body yet
> > (and there is not Content-Lenght header so preview is disabled).
> > In this case squid sends to the icap server the "0\r\n\r\n" string
> > (0\r\n definition + \r\n after chunk)
> > The icap server believes that this is the end of body and does not
> > expect more data.
>
> I see! Writing last-chunk when the body is [still] expected is obviously
> wrong and should be fixed. I will try to reproduce and fix this.

I cannot reproduce the above. I made a server that responds to an HTTP
GET with HTTP headers and then waits before sending the message body.
There is no Content-Length header. After Squid received the HTTP
response headers and successfully wrote the ICAP message prefix to the
ICAP server, I get:

| ICAPModXact::noteCommWrote called [Comm(13wr)w(2)/]
| ICAP/ICAPModXact.cc(164) Wrote 670 bytes
| ICAP/ICAPModXact.cc(258) will write up to 0 bytes of prime virgin body
| ICAPModXact has no writeable prime virgin body content
| ICAP/ICAPModXact.cc(287) will write 0 raw bytes of prime virgin body
| ICAPModXact::noteCommWrote ended [Comm(13r)w(5)/]

As you can see, ICAPModXact refuses to write anything when there is no
response body yet. Was your test case different?

Thank you,

Alex.
Received on Tue Oct 03 2006 - 10:13:05 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Nov 01 2006 - 12:00:06 MST