]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http: make providing Proxy-Connection header not cause duplicated headers
authorDaniel Stenberg <daniel@haxx.se>
Sun, 17 Jan 2021 17:20:06 +0000 (18:20 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 19 Jan 2021 10:40:15 +0000 (11:40 +0100)
Fixes test 1180

Bug: https://curl.se/mail/lib-2021-01/0095.html
Reported-by: Fabian Keil
Closes #6472

lib/http.c

index 993dc61af2c398b9fda0d0e84d836c2737137015..520ac1070bd8d24dc1b006fd2c009f0cb266bd5c 100644 (file)
@@ -3123,6 +3123,7 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
 #ifndef CURL_DISABLE_PROXY
                   (conn->bits.httpproxy &&
                    !conn->bits.tunnel_proxy &&
+                   !Curl_checkheaders(data, "Proxy-Connection") &&
                    !Curl_checkProxyheaders(data, conn, "Proxy-Connection"))?
                   "Proxy-Connection: Keep-Alive\r\n":"",
 #else