Re: [PATCH] Truncate HTTP response bodies to match clen

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Thu, 02 Jul 2009 10:14:03 -0600

On 06/28/2009 01:50 PM, Henrik Nordstrom wrote:
> lör 2009-06-27 klockan 08:39 -0600 skrev Alex Rousskov:
>
>> Do you think this change should go in?
>
> A strong + from me.

Committed to trunk. Amos, please commit to 3.1 (using trunk) and 3.0
(using the patch I originally posted as it was based on 3p0-plus).

> For what it's worth Squid-2 was fixed long ago. But it took quite some
> iterations before all cases were covered.. When this condition is
> detected it not only discards excess data and closes the connection, it
> also throws out the current response from the cache as it's malformed.

I agree that we should not cache the truncated response. Unfortunately,
we cannot use HttpStateData::cacheableReply for that because it is
called before we know about the body truncation.

Will everything work as expected if we call entry->makePrivate() later
in the process, when the extra body starts coming in?

Thank you,

Alex.
Received on Thu Jul 02 2009 - 16:14:28 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 03 2009 - 12:00:03 MDT