]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #2032: assertion failed: comm.cc:116: "ccb->active == false"
authorhno <>
Tue, 4 Dec 2007 10:35:52 +0000 (10:35 +0000)
committerhno <>
Tue, 4 Dec 2007 10:35:52 +0000 (10:35 +0000)
don't try to process the body on CONNECT requests even if there is a
Content-Length header.

src/client_side.cc

index a2b0859e7a8ce3c9eaeef3ac5499007cf1462940..06c9bb42ef0146334c8277a216f7fa8f110b49ac 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.769 2007/11/13 23:25:34 rousskov Exp $
+ * $Id: client_side.cc,v 1.770 2007/12/04 03:35:52 hno Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -2251,9 +2251,12 @@ clientProcessRequest(ConnStateData::Pointer &conn, HttpParser *hp, ClientSocketC
     http->request = HTTPMSGLOCK(request);
     clientSetKeepaliveFlag(http);
 
-    /* Do we expect a request-body? */
+    /* If this is a CONNECT, don't schedule a read - ssl.c will handle it */
+    if (http->request->method == METHOD_CONNECT)
+        context->mayUseConnection(true);
 
-    if (request->content_length > 0) {
+    /* Do we expect a request-body? */
+    if (!context->mayUseConnection() && request->content_length > 0) {
         request->body_pipe = conn->expectRequestBody(request->content_length);
 
         // consume header early so that body pipe gets just the body
@@ -2283,10 +2286,6 @@ clientProcessRequest(ConnStateData::Pointer &conn, HttpParser *hp, ClientSocketC
         context->mayUseConnection(true);
     }
 
-    /* If this is a CONNECT, don't schedule a read - ssl.c will handle it */
-    if (http->request->method == METHOD_CONNECT)
-        context->mayUseConnection(true);
-
     http->calloutContext = new ClientRequestContext(http);
 
     http->doCallouts();