[squid-users] Squid caching bad objects

Alex Rousskov rousskov at measurement-factory.com
Tue Jun 27 16:34:35 UTC 2017


On 06/27/2017 10:11 AM, Razor Cross wrote:
> On Mon, Jun 26, 2017 at 12:06 PM, Alex Rousskov wrote:

>     >I suspect that the COMPLETE_NONPERSISTENT_MSG case in
>     >HttpStateData::processReplyBody() should be changed to call
>     >StoreEntry::lengthWentBad("missing last-chunk") when lastChunk is false
>     >and HttpStateData::flags.chunked is true.

>       We are able to reproduce the issue . If server socket is closed
> after sending first chunk of data, squid is caching the partial object
> even though it did not receive the remaining chunks.

If you are not going to fix this yourself, please consider filing a bug
report, citing this email thread.


> I feel it has to
> make sure that lastchunk has received before caching the data.

That is impossible in general (the response may be too big to buffer)
but is also unnecessary in most cases (because Squid can stop caching
and delete the being-cached object in-flight). My paragraph quoted above
has the blueprint for a possible fix.

Alex.


More information about the squid-users mailing list