From: hno <> Date: Tue, 4 Dec 2007 10:35:52 +0000 (+0000) Subject: Bug #2032: assertion failed: comm.cc:116: "ccb->active == false" X-Git-Tag: SQUID_3_0_STABLE1~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b66e0e8618e574a63d8507fdf6fbbf71c960e490;p=thirdparty%2Fsquid.git Bug #2032: assertion failed: comm.cc:116: "ccb->active == false" don't try to process the body on CONNECT requests even if there is a Content-Length header. --- diff --git a/src/client_side.cc b/src/client_side.cc index a2b0859e7a..06c9bb42ef 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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();