From: Nathan Hoad Date: Fri, 18 Oct 2013 23:52:10 +0000 (-0600) Subject: Append "Connection: close" to OPTIONS requests when icap_persistent_connections X-Git-Tag: SQUID_3_5_0_1~592 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77f6d1d2986563d71ab09a413bdca3a61dc81422;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 e092d72843..7fe04dd254 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);