From: Nathan Hoad Date: Thu, 13 Feb 2014 06:09:26 +0000 (+1300) Subject: Bug 4026: SSL and adaptation_access does not handle aborted connections X-Git-Tag: SQUID_3_5_0_1~372 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6bc2a98d0669da1ae14a2fc7da780eb12afc9bf7;p=thirdparty%2Fsquid.git Bug 4026: SSL and adaptation_access does not handle aborted connections --- diff --git a/src/client_side_request.cc b/src/client_side_request.cc index d69c99f1c2..a81aa288c3 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -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;