]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4026: SSL and adaptation_access does not handle aborted connections
authorNathan Hoad <nathan@getoffmalawn.com>
Tue, 18 Feb 2014 08:55:04 +0000 (01:55 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 18 Feb 2014 08:55:04 +0000 (01:55 -0700)
src/client_side_request.cc

index 45e26ff7a6fc96fd5f36960cba58b40e38302f5c..073af4f9645131fb73567bf855719b890c2ec43f 100644 (file)
@@ -848,11 +848,12 @@ ClientHttpRequest::noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer g)
 #if ICAP_CLIENT
     Adaptation::Icap::History::Pointer ih = request->icapHistory();
     if (ih != NULL) {
-        if (getConn() != NULL) {
+        if (getConn() != NULL && getConn()->clientConnection != NULL) {
             ih->rfc931 = getConn()->clientConnection->rfc931;
 #if USE_SSL
-            assert(getConn()->clientConnection != NULL);
-            ih->ssluser = sslGetUserEmail(fd_table[getConn()->clientConnection->fd].ssl);
+            if (getConn()->clientConnection->isOpen()) {
+                ih->ssluser = sslGetUserEmail(fd_table[getConn()->clientConnection->fd].ssl);
+            }
 #endif
         }
         ih->log_uri = log_uri;