summaryrefslogtreecommitdiff
path: root/lib/http_proxy.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-02-04 15:07:02 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-02-08 11:09:40 +0100
commit113f04e664b16b944e64498a73a4dab990fe9a68 (patch)
tree1147a853d194503c7d6eb6c878989029c2a8a40b /lib/http_proxy.c
parent7f97fd5a83931ef4b84308d690d54dd83a752433 (diff)
downloadcurl-113f04e664b16b944e64498a73a4dab990fe9a68.tar.gz
Proxy-Connection: stop sending this header by default
RFC 7230 says we should stop. Firefox already stopped. Bug: https://github.com/curl/curl/issues/633 Reported-By: Brad Fitzpatrick Closes #633
Diffstat (limited to 'lib/http_proxy.c')
-rw-r--r--lib/http_proxy.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 46727e550..e082ba291 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -150,7 +150,6 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
if(!result) {
char *host=(char *)"";
- const char *proxyconn="";
const char *useragent="";
const char *http = (conn->proxytype == CURLPROXY_HTTP_1_0) ?
"1.0" : "1.1";
@@ -171,9 +170,6 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
return CURLE_OUT_OF_MEMORY;
}
}
- if(!Curl_checkProxyheaders(conn, "Proxy-Connection:"))
- proxyconn = "Proxy-Connection: Keep-Alive\r\n";
-
if(!Curl_checkProxyheaders(conn, "User-Agent:") &&
data->set.str[STRING_USERAGENT])
useragent = conn->allocptr.uagent;
@@ -183,15 +179,13 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
"CONNECT %s HTTP/%s\r\n"
"%s" /* Host: */
"%s" /* Proxy-Authorization */
- "%s" /* User-Agent */
- "%s", /* Proxy-Connection */
+ "%s", /* User-Agent */
hostheader,
http,
host,
conn->allocptr.proxyuserpwd?
conn->allocptr.proxyuserpwd:"",
- useragent,
- proxyconn);
+ useragent);
if(host && *host)
free(host);