From: Nathan Hoad Date: Thu, 24 Oct 2013 15:07:27 +0000 (-0600) Subject: Append Connection:close to OPTIONS requests when icap_persistent_connections is off. X-Git-Tag: SQUID_3_4_0_3~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d6c2ee4b2c7d47b3bcda1b2b0f87e3c6dbb86a5;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);