From: Amos Jeffries Date: Tue, 3 Jan 2012 22:11:51 +0000 (-0700) Subject: Bug 3085: Crash when parsing esi:include X-Git-Tag: SQUID_3_1_19~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dbc9b9d959297e2305ce67e36439b0472a71f6a;p=thirdparty%2Fsquid.git Bug 3085: Crash when parsing esi:include --- diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 6fdcde9b6b..531e437859 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -873,18 +873,22 @@ clientInterpretRequestHeaders(ClientHttpRequest * http) request->flags.auth = 1; ConnStateData *http_conn = http->getConn(); - assert(http_conn); - request->flags.connection_auth_disabled = http_conn->port->connection_auth_disabled; - if (!request->flags.connection_auth_disabled) { - if (http_conn->pinning.fd != -1) { - if (http_conn->pinning.auth) { - request->flags.connection_auth = 1; - request->flags.auth = 1; - } else { - request->flags.connection_proxy_auth = 1; + if (http_conn) { + request->flags.connection_auth_disabled = http_conn->port->connection_auth_disabled; + if (!request->flags.connection_auth_disabled) { + if (http_conn->pinning.fd != -1) { + if (http_conn->pinning.auth) { + request->flags.connection_auth = 1; + request->flags.auth = 1; + } else { + request->flags.connection_proxy_auth = 1; + } + request->setPinnedConnection(http_conn); } - request->setPinnedConnection(http_conn); } + } else { + // internal requests and ESI don't have client conn. + request->flags.connection_auth_disabled = 1; } /* check if connection auth is used, and flag as candidate for pinning