diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-01-31 08:10:07 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-04-04 17:03:43 +0200 |
commit | ac887eedbc17a0d78b11ff467858c76a5127d1f4 (patch) | |
tree | 33f12aad12cd5eb43e1a5d069e1ecb2747e7e864 /lib/http_proxy.c | |
parent | 42937f87e65554ec4b887a5bd0b34abdbf2e0977 (diff) |
CURLOPT_PROXYHEADER: set headers for proxy-only
Includes docs and new test cases: 1525, 1526 and 1527
Co-written-by: Vijay Panghal
Diffstat (limited to 'lib/http_proxy.c')
-rw-r--r-- | lib/http_proxy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c index adcfe42dd..0ee1a73d5 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -165,7 +165,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; } - if(!Curl_checkheaders(data, "Host:")) { + if(!Curl_checkProxyheaders(conn, "Host:")) { host = aprintf("Host: %s\r\n", hostheader); if(!host) { free(hostheader); @@ -173,10 +173,10 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; } } - if(!Curl_checkheaders(data, "Proxy-Connection:")) + if(!Curl_checkProxyheaders(conn, "Proxy-Connection:")) proxyconn = "Proxy-Connection: Keep-Alive\r\n"; - if(!Curl_checkheaders(data, "User-Agent:") && + if(!Curl_checkProxyheaders(conn, "User-Agent:") && data->set.str[STRING_USERAGENT]) useragent = conn->allocptr.uagent; @@ -200,7 +200,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, free(hostheader); if(CURLE_OK == result) - result = Curl_add_custom_headers(conn, req_buffer); + result = Curl_add_custom_headers(conn, TRUE, req_buffer); if(CURLE_OK == result) /* CRLF terminate the request */ |