Re: squid-3 icap related patch

From: Tsantilas Christos <chtsanti@dont-contact.us>
Date: Tue, 03 Oct 2006 11:36:13 +0300

Hi Alex,
   
Alex Rousskov wrote:

>On Thu, 2006-09-28 at 05:18 -0400, Tsantilas Christos wrote:
>
>
>
>>3) File ICAP/ICAPModXact.cc function
>>ICAPModXact::handleCommWroteHeaders()
>>
>>Sometimes, we have read the headers but not any part of the body yet
>>so in this case we must not call writeMore() function.
>>
>>- writeMore();
>>+ if(virgin->data->body && virgin->data->body->contentSize())
>>+ writeMore();
>>
>>
>
>As far as I can see, virgin->data->body is never NULL at this stage and
>the rest of the code assumes it is not NULL. Thus, I assume the first
>part of the above if-statement can be safely removed. This leaves us
>with the zero-size content part.
>
>
Yes that the virgin->data->body is never NULL. I will check it more...

>I believe zero size content is valid. If writeMore() cannot handle it,
>writeMore() should be fixed and still called unconditionally in the
>above code. One place where zero-sized content is useful is for
>zero-size previews, which are common (please see below on that).
>
>
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.

>Zero-size Preview is very useful because it allows an ICAP server to
>
>receive the HTTP headers without the body before making any decisions.
>Why do you want to disable it? Do we have zero-preview handling bugs
>elsewhere?
>
>
>
You are right about zero-preview and zero size content.
Give me some time to check again if there is any zero-preview
handling bug.....

>I believe I have applied all other changes you wrote about. The changes
>currently live on the squid3-icap branch in the SourceForge Squid
>...................
>
>
OK, I will use the squid3-icap branch for my tests.

Regards,
      Christos
Received on Tue Oct 03 2006 - 02:56:23 MDT

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