From 3d6c2ee4b2c7d47b3bcda1b2b0f87e3c6dbb86a5 Mon Sep 17 00:00:00 2001 From: Nathan Hoad Date: Thu, 24 Oct 2013 09:07:27 -0600 Subject: [PATCH] Append Connection:close to OPTIONS requests when icap_persistent_connections is off. This brings OPTIONS requests behavior inline with REQMOD and RESPMOD. --- src/adaptation/icap/OptXact.cc | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.47.2