aboutsummaryrefslogtreecommitdiff
path: root/lib/http_proxy.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-11-02 11:18:39 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-11-02 11:18:39 +0000
commit3b59696a93e7bbc7ec7ad0371ddac02a7d990cd6 (patch)
tree3d8bb3340a33bc6f181a17638c3160dafbd1639c /lib/http_proxy.c
parentcdccb422671aebd198ed338ac6111cfde303f1cc (diff)
http: Added proxy tunnel authentication message header value extraction
...following recent changes to Curl_base64_decode() rather than trying to parse a header line for the authentication mechanisms which is CRLF terminated and inline zero terminate it.
Diffstat (limited to 'lib/http_proxy.c')
-rw-r--r--lib/http_proxy.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 6a555525d..97edc486e 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -452,8 +452,15 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
(401 == k->httpcode)) ||
(checkprefix("Proxy-authenticate:", line_start) &&
(407 == k->httpcode))) {
- result = Curl_http_input_auth(conn, k->httpcode,
- line_start);
+
+ char *auth = copy_header_value(line_start);
+ if(!auth)
+ return CURLE_OUT_OF_MEMORY;
+
+ result = Curl_http_input_auth(conn, k->httpcode, auth);
+
+ Curl_safefree(auth);
+
if(result)
return result;
}