mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 01:32:25 +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:
parent
5c9a43f478
commit
099d00c4ac
@ -154,6 +154,7 @@ static void proxy_http_free(ProxyNegotiator *pn)
|
|||||||
X(HDR_CONTENT_LENGTH, "Content-Length") \
|
X(HDR_CONTENT_LENGTH, "Content-Length") \
|
||||||
X(HDR_TRANSFER_ENCODING, "Transfer-Encoding") \
|
X(HDR_TRANSFER_ENCODING, "Transfer-Encoding") \
|
||||||
X(HDR_PROXY_AUTHENTICATE, "Proxy-Authenticate") \
|
X(HDR_PROXY_AUTHENTICATE, "Proxy-Authenticate") \
|
||||||
|
X(HDR_PROXY_CONNECTION, "Proxy-Connection") \
|
||||||
/* end of list */
|
/* end of list */
|
||||||
|
|
||||||
typedef enum HttpHeader {
|
typedef enum HttpHeader {
|
||||||
@ -550,7 +551,8 @@ static void proxy_http_process_queue(ProxyNegotiator *pn)
|
|||||||
if (!stricmp(s->token->s, "chunked"))
|
if (!stricmp(s->token->s, "chunked"))
|
||||||
s->chunked_transfer = true;
|
s->chunked_transfer = true;
|
||||||
}
|
}
|
||||||
} else if (hdr == HDR_CONNECTION) {
|
} else if (hdr == HDR_CONNECTION ||
|
||||||
|
hdr == HDR_PROXY_CONNECTION) {
|
||||||
if (!get_token(s))
|
if (!get_token(s))
|
||||||
continue;
|
continue;
|
||||||
if (!stricmp(s->token->s, "close"))
|
if (!stricmp(s->token->s, "close"))
|
||||||
|
Loading…
Reference in New Issue
Block a user