The unified diff between revisions [f35cd536..] and [2f19ac58..] 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 [882d42c7767308a3036106324457a687d15d52b0]
#    to [f2f0d2e1e191ffeec9c101a29a66353d9b9cdc0d]
#
============================================================
--- src/client_side.c	882d42c7767308a3036106324457a687d15d52b0
+++ src/client_side.c	f2f0d2e1e191ffeec9c101a29a66353d9b9cdc0d
@@ -1043,14 +1043,18 @@ clientInterpretRequestHeaders(clientHttp
 	if (request->range)
 	    request->flags.range = 1;
     }
+    /* If any conneciton has been pinned to this client, force keep alive */
     if(http->conn->pinned) {
-	request->flags.auth = 1;
-	request->flags.pinned = 1;
 	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;
+	}
     }
-    if (httpHeaderHas(req_hdr, HDR_AUTHORIZATION))
+    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);
@@ -1459,7 +1463,11 @@ clientBuildReplyHeader(clientHttpRequest
 		    ||
 		    (strncasecmp(value, "Negotiate", 9) == 0 &&
 			(value[9] == '\0' || value[9] == ' '))) {
-		    httpHeaderPutStr(hdr, HDR_PROXY_SUPPORT, "Session-Based-Authentication");
+
+		    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;