From: rousskov <> Date: Fri, 3 Aug 2007 01:32:22 +0000 (+0000) Subject: Partial bug #2034 fix: Inform BodyPipe of the body size when known. X-Git-Tag: SQUID_3_0_PRE7~119 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=c2eef5bdc8e95455be6f368f76a65152aa2f23b8;p=thirdparty%2Fsquid.git Partial bug #2034 fix: Inform BodyPipe of the body size when known. This fix helps the ICAP client to detect aborts and to announce the end of the HTTP message to the ICAP server. A bigger problem is that the HTTP side is using the adapted response to make decisions about the origin server connection. That bug still needs to be fixed. --- diff --git a/src/Server.cc b/src/Server.cc index e0a28e0197..adb2e8fbc9 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -1,5 +1,5 @@ /* - * $Id: Server.cc,v 1.19 2007/08/01 04:18:08 rousskov Exp $ + * $Id: Server.cc,v 1.20 2007/08/02 19:32:22 rousskov Exp $ * * DEBUG: * AUTHOR: Duane Wessels @@ -351,6 +351,8 @@ ServerStateData::startIcap(ICAPServiceRep::Pointer service, HttpRequest *cause) reply->body_pipe = virginBodyDestination; debugs(93, 6, HERE << "will send virgin reply body to " << virginBodyDestination << "; size: " << size); + if (size > 0) + virginBodyDestination->setBodySize(size); } adaptedHeadSource = initiateIcap(