The unified diff between revisions [569c5734..] and [60564a86..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/client_side.c'

#
#
# patch "src/client_side.c"
#  from [aeb1c49f1a704cceb4928f31ac6df0b91c200cad]
#    to [671e6d455044433ea7cf317f99e7faeb3dadb80f]
#
============================================================
--- src/client_side.c	aeb1c49f1a704cceb4928f31ac6df0b91c200cad
+++ src/client_side.c	671e6d455044433ea7cf317f99e7faeb3dadb80f
@@ -1033,9 +1033,18 @@ clientInterpretRequestHeaders(clientHttp
 	if (request->range)
 	    request->flags.range = 1;
     }
-    if ((httpHeaderHas(req_hdr, HDR_AUTHORIZATION)) || (request->flags.pinned))
+    /* If any conneciton has been pinned to this client, force keep alive */
+    if(http->conn->pinned) {
+	request->flags.must_keepalive = 1;
+	/* If this specific host/port has been pinned to this client, flag */
+	if(pconnLookup(request->host,request->port,&request->client_addr,request->client_port)) {
+	    request->flags.auth = 1;
+	    request->flags.pinned = 1;
+	}
+    }
+    else if (httpHeaderHas(req_hdr, HDR_AUTHORIZATION))
 	request->flags.auth = 1;
-    if (request->login[0] != '\0')
+    else if (request->login[0] != '\0')
 	request->flags.auth = 1;
     if (httpHeaderHas(req_hdr, HDR_VIA)) {
 	String s = httpHeaderGetList(req_hdr, HDR_VIA);
@@ -1444,9 +1453,14 @@ clientBuildReplyHeader(clientHttpRequest
 		    ||
 		    (strncasecmp(value, "Negotiate", 9) == 0 &&
 			(value[9] == '\0' || value[9] == ' '))) {
-		    httpHeaderPutStr(hdr, HDR_PROXY_SUPPORT, "Session-Based-Authentication");
-		    httpHeaderPutStr(hdr, HDR_CONNECTION, "Proxy-support");
+
+		    if(!request->flags.accelerated) {
+			    httpHeaderPutStr(hdr, HDR_PROXY_SUPPORT, "Session-Based-Authentication");
+			    httpHeaderPutStr(hdr, HDR_CONNECTION, "Proxy-support");
+		    }
 		    request->flags.pinned=1;
+		    request->flags.must_keepalive = 1;
+		    http->conn->pinned=1;
 		    break;
 		}
 	    }