]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Append Connection:close to OPTIONS requests when icap_persistent_connections is off.
authorNathan Hoad <nathan@getoffmalawn.com>
Thu, 24 Oct 2013 15:07:27 +0000 (09:07 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 24 Oct 2013 15:07:27 +0000 (09:07 -0600)
This brings OPTIONS requests behavior inline with REQMOD and RESPMOD.

src/adaptation/icap/OptXact.cc

index e092d728434f89a95cac4cc2349c04eaed0d3a43..7fe04dd254cc147e7b88e4cd4093501fc27e8321 100644 (file)
@@ -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);