]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Stephen Thorne <stephen@thorne.id.au>
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 12 Aug 2010 09:37:14 +0000 (21:37 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 12 Aug 2010 09:37:14 +0000 (21:37 +1200)
Bug 2936: NTLM-Authenticate 407 and Proxy-Connection: Close in same response.

Squid default from the days of HTTP/1.0 was to close connections unless
keep-alive was explicitly known. This changes the default to send
keep-alive unless we have a good reason to close.

src/client_side_reply.cc

index fdf31850691eff28a6c14f2d162b186f04c63af6..a32d7e40a235e3ef0f8a63be6798e15065d05c90 100644 (file)
@@ -1383,6 +1383,9 @@ clientReplyContext::buildReplyHeader()
     } else if (fdUsageHigh()&& !request->flags.must_keepalive) {
         debugs(88, 3, "clientBuildReplyHeader: Not many unused FDs, can't keep-alive");
         request->flags.proxy_keepalive = 0;
+    } else if (request->http_ver.major == 1 && request->http_ver.minor == 1) {
+        debugs(88, 3, "clientBuildReplyHeader: Client is HTTP/1.1, send keep-alive, no overriding reasons not to");
+        request->flags.proxy_keepalive = 1;
     }