]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4026: SSL and adaptation_access does not handle aborted connections
authorNathan Hoad <nathan@getoffmalawn.com>
Sun, 9 Mar 2014 02:10:07 +0000 (19:10 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 9 Mar 2014 02:10:07 +0000 (19:10 -0700)
src/client_side_request.cc

index fce6e180839c15b59d70094a01dc0bc938ed4b01..8ef57d0dc3592874213ad7de19a29de648516e85 100644 (file)
@@ -875,11 +875,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;