bodyreader bugs and over-reading

From: Adrian Chadd <adrian@dont-contact.us>
Date: Wed, 6 Sep 2006 23:01:20 +0800

Hiya,

I lodged this bug - http://www.squid-cache.org/bugs/show_bug.cgi?id=1754 -
and I think I've tracked it down.

request->body_reader->notify() is called with whatever's left in the conn buffer.
So it bumps available to be that amount.
BodyReader::read() then tries reading up to that amount from the conn
buffer.

Normally this is the same as the content-length; but occasionally
the content-length: is a couple bytes less than whats in the conn buffer.
Squid then gets confused :)

So, my suggested patch is to modify BodyReader::read() to only read
what its been told to read via the Content-Length header. I think this
is whats going on in the squid-2.6 code where its nipping the body size
to copy against the content-length size.

How's this sound?

Adrian
Received on Wed Sep 06 2006 - 09:00:39 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Oct 01 2006 - 12:00:06 MDT