]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Partial bug #2034 fix: Inform BodyPipe of the body size when known.
authorrousskov <>
Fri, 3 Aug 2007 01:32:22 +0000 (01:32 +0000)
committerrousskov <>
Fri, 3 Aug 2007 01:32:22 +0000 (01:32 +0000)
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.

src/Server.cc

index e0a28e01972fef46b147d823b8c6bf4501fe52fb..adb2e8fbc93a117ed66353440bd4e7c4140dbffa 100644 (file)
@@ -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(