]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4026: SSL and adaptation_access does not handle aborted connections
authorNathan Hoad <nathan@getoffmalawn.com>
Thu, 13 Feb 2014 06:09:26 +0000 (19:09 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 13 Feb 2014 06:09:26 +0000 (19:09 +1300)
src/client_side_request.cc

index d69c99f1c24c215dd882e8d095bca840857c53e1..a81aa288c31a6851bc8b4119eb6862ecced30c40 100644 (file)
@@ -853,11 +853,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;