Hello,
I think I have found a bug in the Squid-ICAP patch and I would like to
have your opinion about it.
I use a tcpdump strace and verbose log to track a problem which occurs
sometimes during a respmod request but is triggered during the reqmod
answer analysis I think.
We use squid-2.5.
ons 2006-11-08 klockan 16:26 +0100 skrev Christophe Boyanique:
> We have read enough data (27 bytes) to have all the body (as
> content-length is 27), so we set the eof flag.
>
> if (!icap->flags.reqmod_http_entity_eof)
> commSetSelect(fd, COMM_SELECT_READ, icapReqModReadHttpBody,
>
Henrik Nordstrom a écrit :
We have read enough data (27 bytes) to have all the body (as
content-length is 27), so we set the eof flag.
if (!icap->flags.reqmod_http_entity_eof)
commSetSelect(fd, COMM_SELECT_READ, icapReqModReadHttpBody,
icap, 0);
eof in ICAP is that 0 chunk... so
Hi,
I send this mail from un account which is not subscribed to the mailing
list so I am re-sending it. Sory about that.
Please to the mailing list moderator to ingore the first mail.
-
Hi Christophe,
First of all squid3 has a better support for icap protocol now.
Maybe it is bette
On Thu, Nov 09, 2006, Christophe Boyanique wrote:
> >Note: As Adrian said most efforts is focused on the Squid-3 release,
> >which also includes ICAP support.
>
> I understand that but the problem is that we have this bug in production
> on heavy loaded site (we took several weeks to find it out
tor 2006-11-09 klockan 12:39 +0100 skrev Christophe Boyanique:
> > eof in ICAP is that 0 chunk... so something is not right here in the
> > ICAP patch.
>
> The problem is that this 0\r\n arrives after the first read of the 27
> first bytes.
Which should not be a problem in therms of ICAP. It's
Hi Christophe,
First of all squid3 has a better support for icap protocol now.
Maybe it is better to use squid3 as icap client.
However, yes the problem exists in squid25-icap and squid26-icap.
In fle icap_reqmod.c, in function icapReqModReadHttpBody near line
878-880 try this small patch
tor 2006-11-09 klockan 12:37 +0200 skrev Tsantilas Christos:
> + if (icap->chunk_size < 0 )
> + icap->flags.reqmod_http_entity_eof = 1;
Shouldn't that be <= 0 or maybe even == 0?
Regards
Henrik
signature.asc
Description: Detta är en digitalt signerad meddelandedel
Hi,
I think it should be icap->chunk_size == -2.
In icapParseChunkSize function in common_icap.c file the
icap->chunk_size set to -2 when the 0\r\n\r\n sequence parsed
Regards,
Christos
Henrik Nordstrom wrote:
> tor 2006-11-09 klockan 12:37 +0200 skrev Tsantilas Christos:
>
>> +
On Wed, 2006-11-08 at 16:26 +0100, Christophe Boyanique wrote:
> I think I have found a bug in the Squid-ICAP patch and I would like to
> have your opinion about it.
...
> The problem is that the end of the chunk (0\r\n\r\n) is not sent (and
> read) in the same stream that the beginning of the ch
Hello,
Thanks for you support.
I tried the patch from Tsantilas:
if (icap->chunk_size < 0)
icap->flags.reqmod_http_entity_eof = 1;
instead of:
if (icap->reqmod.http_entity.bytes_read >= icap->request->content_length)
icap->flags.reqmod_http_entity_eof = 1;
And that corrects
Hi,
From your logs what I am seeing is that the
icap->reqmod.http_entity.buf.size==0 so the icapRqModPassHttpBody must
not called, but it is called. It is strange.
Did you touch something else in code? Can you run squid in gdb and send
a backtrace after the crash?
Regards,
Christos
Christ
Hi Christophe,
If you are still looking for the solution, try the following patch in
icap_reqmod.c file. With this patch the icapReqModPassHttpBody function
called if the icap->reqmod.http_entity.buf.size is zero, and at this
phase can handle correctly, the case that the
icap->flags.reqmod_http_e
Hi all,
Tsantilas Christos wrote :
If you are still looking for the solution, try the following patch in
icap_reqmod.c file. With this patch the icapReqModPassHttpBody function
called if the icap->reqmod.http_entity.buf.size is zero, and at this
phase can handle correctly, the case that the
Hi Christophe,
Maybe I was not clear on my last mail. Sorry.
Christophe Boyanique wrote:
>
>
> in icapReqModReadHttpBody function replacing the test
>
> if (icap->reqmod.http_entity.bytes_read >= icap->request->content_length)
>
> by
>
> if (icap->chunk_size < 0)
OK this is needed.
But i
Tsantilas Christos a e'crit :
Hello Christos,
Maybe I was not clear on my last mail. Sorry.
You were but I forgot to mention that I tried what you adviced.
But in the same function replace the test:
if (icap->reqmod.http_entity.callback &&
icap->reqmod.http_entity.buf.size) {
Christophe Boyanique wrote:
Yes we tried it and this leads to segfault too.
:-(
By reading the log I just noticed that with your modification the
icapReqModPassHttpBody is not called:
This is for the specific request (POST):
2006/11/24 14:15:22| handing request bodies in ICAP REQMOD
200
17 matches
Mail list logo