From a7082ac17728049e05aed7063d9115d1b6017e9c Mon Sep 17 00:00:00 2001 From: Nathan Hoad Date: Sat, 8 Mar 2014 19:10:07 -0700 Subject: [PATCH] Bug 4026: SSL and adaptation_access does not handle aborted connections --- src/client_side_request.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client_side_request.cc b/src/client_side_request.cc index fce6e18083..8ef57d0dc3 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -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; -- 2.47.2