1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

HTTP proxy: accept the 'Proxy-Connection' header.

FreeProxy sends this as a substitute for the standard 'Connection'
header (with the same contents, i.e. 'keep-alive' or 'close' depending
on whether the TCP connection is going to continue afterwards). The
Internet reckons it's not standard, but it's easy to recognise as an
ad-hoc synonym for 'Connection'.
This commit is contained in:
Simon Tatham 2022-02-19 11:56:54 +00:00
parent 5c9a43f478
commit 099d00c4ac

View File

@ -154,6 +154,7 @@ static void proxy_http_free(ProxyNegotiator *pn)
X(HDR_CONTENT_LENGTH, "Content-Length") \
X(HDR_TRANSFER_ENCODING, "Transfer-Encoding") \
X(HDR_PROXY_AUTHENTICATE, "Proxy-Authenticate") \
X(HDR_PROXY_CONNECTION, "Proxy-Connection") \
/* end of list */
typedef enum HttpHeader {
@ -550,7 +551,8 @@ static void proxy_http_process_queue(ProxyNegotiator *pn)
if (!stricmp(s->token->s, "chunked"))
s->chunked_transfer = true;
}
} else if (hdr == HDR_CONNECTION) {
} else if (hdr == HDR_CONNECTION ||
hdr == HDR_PROXY_CONNECTION) {
if (!get_token(s))
continue;
if (!stricmp(s->token->s, "close"))