Re: squid-2.5 / ICAP patch

From: Christos Tsantilas <chtsanti@dont-contact.us>
Date: Thu, 05 Aug 2004 12:31:05 -0700

I think that there is a small error in Olivier's patch.
The calculation of Encapsulated header for REQMOD has wrong values again.
The calculation of this values had corrected with a previews
applied patch (icap_reqmod.c revision 1.1.2.29).

The code at file icap_reqmod.c line 621:

if (icap->request->content_length > 0)
        memBufPrintf(&mb, ", req-body=%d", mb_hdr.size+2);
    else
        memBufPrintf(&mb, ", null-body=%d", mb_hdr.size+2);

Must be back to:
  if (icap->request->content_length > 0)
        memBufPrintf(&mb, ", req-body=%d", mb_hdr.size);
    else
        memBufPrintf(&mb, ", null-body=%d", mb_hdr.size);

The "crlf" sequence now added at the end of mb_hdr (which later
added at the end of mb header) instead of the end of mb header
so the mb_hdr.size includes the size of crlf sequence (2 bytes).

Just cancel the patch of file icap_reqmod.c. The rest patch looks good.

Regards,
    Christos

> I've finally committed your patch to the sourceforge CVS. They
> look good to me, but I have not tested them.
>
>
> Thanks a lot!
>
>
> Duane W.
>
Received on Thu Aug 05 2004 - 06:04:10 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Sep 01 2004 - 12:00:04 MDT