--------------------- PatchSet 3858 Date: 2006/10/18 21:44:59 Author: rousskov Branch: squid3-icap Tag: (none) Log: - Do not assert that "size" does not become zero in clientReadBody. The size probably can become zero when BodyReader expects a [large] request body, but not the entire body is already available, and whatever is available has been consumed, making conn->in.notYetUsed zero. Warning: This change may be wrong because the debugging output in BodyReader::read() (that calls clientReadBody) says "Help". Somebody with a better knowledge of program flow may want to check the logic for this specific case. For example, it is possible that kick_func should be called (or earlier checks should be adjusted so that we kick and quit earlier). Members: src/client_side.cc:1.74.2.14->1.74.2.15 Index: squid3/src/client_side.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side.cc,v retrieving revision 1.74.2.14 retrieving revision 1.74.2.15 diff -u -r1.74.2.14 -r1.74.2.15 --- squid3/src/client_side.cc 18 Oct 2006 21:26:10 -0000 1.74.2.14 +++ squid3/src/client_side.cc 18 Oct 2006 21:44:59 -0000 1.74.2.15 @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.74.2.14 2006/10/18 21:26:10 rousskov Exp $ + * $Id: client_side.cc,v 1.74.2.15 2006/10/18 21:44:59 rousskov Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2552,15 +2552,14 @@ debugs(33,3,HERE << "clientReadBody in.notYetUsed " << conn->in.notYetUsed); if (size > conn->in.notYetUsed) - size = conn->in.notYetUsed; + size = conn->in.notYetUsed; // may make size zero debugs(33,3,HERE << "clientReadBody actual size " << size); - assert(size); - - mb.append(conn->in.buf, size); - - connNoteUseOfBuffer(conn, size); + if (size > 0) { + mb.append(conn->in.buf, size); + connNoteUseOfBuffer(conn, size); + } return size; }