The unified diff between revisions [78dc1768..] 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 [ccf0d7a63d8a6f64a14503f413fbdc9aa28bee2c]
# to [671e6d455044433ea7cf317f99e7faeb3dadb80f]
#
============================================================
--- src/client_side.c ccf0d7a63d8a6f64a14503f413fbdc9aa28bee2c
+++ src/client_side.c 671e6d455044433ea7cf317f99e7faeb3dadb80f
@@ -1033,9 +1033,18 @@ clientInterpretRequestHeaders(clientHttp
if (request->range)
request->flags.range = 1;
}
- if (httpHeaderHas(req_hdr, HDR_AUTHORIZATION))
+ /* 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);
@@ -1443,8 +1452,17 @@ clientBuildReplyHeader(clientHttpRequest
(value[4] == '\0' || value[4] == ' '))
||
(strncasecmp(value, "Negotiate", 9) == 0 &&
- (value[9] == '\0' || value[9] == ' ')))
+ (value[9] == '\0' || value[9] == ' '))) {
+
+ 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;
+ }
}
}
}