From: Nathan Hoad Date: Thu, 24 Oct 2013 15:36:23 +0000 (-0600) Subject: Append Connection:close to OPTIONS requests when icap_persistent_connections is off. X-Git-Tag: SQUID_3_3_10~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3bf58c439c6a44998262555e2ffb424cf48324d;p=thirdparty%2Fsquid.git Append Connection:close to OPTIONS requests when icap_persistent_connections is off. This brings OPTIONS requests behavior inline with REQMOD and RESPMOD. --- diff --git a/src/adaptation/icap/OptXact.cc b/src/adaptation/icap/OptXact.cc index d4df5d3003..5f219e639e 100644 --- a/src/adaptation/icap/OptXact.cc +++ b/src/adaptation/icap/OptXact.cc @@ -51,6 +51,10 @@ void Adaptation::Icap::OptXact::makeRequest(MemBuf &buf) buf.Printf("OPTIONS " SQUIDSTRINGPH " ICAP/1.0\r\n", SQUIDSTRINGPRINT(uri)); const String host = s.cfg().host; buf.Printf("Host: " SQUIDSTRINGPH ":%d\r\n", SQUIDSTRINGPRINT(host), s.cfg().port); + + if (!TheConfig.reuse_connections) + buf.Printf("Connection: close\r\n"); + if (TheConfig.allow206_enable) buf.Printf("Allow: 206\r\n"); buf.append(ICAP::crlf, 2);