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/url.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index ebd38ccee..25bb04115 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1067,6 +1067,20 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, data->set.headers = va_arg(param, struct curl_slist *); break; + case CURLOPT_PROXYHEADER: + /* + * Set a list with proxy headers to use (or replace internals with) + * + * Since CURLOPT_HTTPHEADER was the only way to set HTTP headers for a + * long time we remain doing it this way until CURLOPT_PROXYHEADER is + * used. As soon as this option has been used, if set to anything but + * NULL, custom headers for proxies are only picked from this list. + * + * Set this option to NULL to restore the previous behavior. + */ + data->set.proxyheaders = va_arg(param, struct curl_slist *); + break; + case CURLOPT_HTTP200ALIASES: /* * Set a list of aliases for HTTP 200 in response header -- cgit v1.2.3