From: wessels <> Date: Tue, 20 Dec 2005 12:23:59 +0000 (+0000) Subject: The check for "connection: close" in the ICAP header X-Git-Tag: SQUID_3_0_PRE4~441 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc764d26dcb83043c6659a13d84e303afdf6ea66;p=thirdparty%2Fsquid.git The check for "connection: close" in the ICAP header belongs in parseIcapHead() rather than parseHead(). --- diff --git a/src/ICAP/ICAPModXact.cc b/src/ICAP/ICAPModXact.cc index 30ed865c07..bd99d9f54d 100644 --- a/src/ICAP/ICAPModXact.cc +++ b/src/ICAP/ICAPModXact.cc @@ -574,6 +574,11 @@ void ICAPModXact::parseIcapHead() if (!parseHead(icapReply)) return; + if (httpHeaderHasConnDir(&icapReply->header, "close")) { + debugs(93, 5, HERE << "found connection close"); + reuseConnection = false; + } + switch (icapReply->sline.status) { case 100: @@ -691,6 +696,9 @@ void ICAPModXact::parseHttpHead() state.parsing = State::psBody; } +/* + * Common routine used to parse both HTTP and ICAP headers + */ bool ICAPModXact::parseHead(HttpMsg *head) { assert(head); @@ -706,11 +714,6 @@ bool ICAPModXact::parseHead(HttpMsg *head) return false; } - if (httpHeaderHasConnDir(&head->header, "close")) { - debug(93,5)("%s(%d) found connection close\n", __FILE__,__LINE__); - reuseConnection = false; - } - readBuf.consume(head->hdr_sz); return true; }