--------------------- PatchSet 4084 Date: 2007/03/08 05:23:09 Author: rousskov Branch: squid3-icap Tag: (none) Log: - When appending body data, do not append more than the known body size. This fixes the following assertion when POSTing from IE in my tests: assertion failed: client_side.cc:3205: "bodySizeLeft() > 0 I suspect IE or some Javascripts running on IE were appending extra CRLF to a POST, exposing the bug, and triggering the above assertion. - Added debugging. Members: src/BodyPipe.cc:1.1.2.2->1.1.2.3 Index: squid3/src/BodyPipe.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/BodyPipe.cc,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/src/BodyPipe.cc 20 Feb 2007 16:04:28 -0000 1.1.2.2 +++ squid3/src/BodyPipe.cc 8 Mar 2007 05:23:09 -0000 1.1.2.3 @@ -55,6 +55,7 @@ assert(!theConsumer); theBodySize = aBodySize; + debugs(91,7, HERE << "set body size" << status()); } size_t BodyPipe::bodySize() const @@ -103,6 +104,9 @@ size_t BodyPipe::putMoreData(const char *buf, size_t size) { + if (bodySizeKnown()) + size = XMIN(size, unproducedSize()); + const size_t spaceSize = static_cast(theBuf.potentialSpaceSize()); if ((size = XMIN(size, spaceSize))) { theBuf.append(buf, size);