From ac887eedbc17a0d78b11ff467858c76a5127d1f4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 31 Jan 2014 08:10:07 +0100 Subject: CURLOPT_PROXYHEADER: set headers for proxy-only Includes docs and new test cases: 1525, 1526 and 1527 Co-written-by: Vijay Panghal --- lib/http_proxy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/http_proxy.c') 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 */ -- cgit v1.2.3