Proxy authentication broken, bugfix attached
Status: Alpha
Brought to you by:
coroberti
From: F. <fra...@gm...> - 2008-05-19 12:50:57
|
diff -Nru curl-loader-0.44/loader.c curl-loader-0.44-patched/loader.c --- curl-loader-0.44/loader.c 2007-10-14 15:51:05.000000000 +0200 +++ curl-loader-0.44-patched/loader.c 2008-05-19 11:47:10.000000000 +0200 @@ -784,13 +784,14 @@ char proxy_userpwd[256]; sprintf (proxy_userpwd, "%s:%s", url->username, url->password); - curl_easy_setopt(handle, CURLOPT_USERPWD, proxy_userpwd); + curl_easy_setopt(handle, CURLOPT_PROXYUSERPWD, proxy_userpwd); } else { - curl_easy_setopt(handle, CURLOPT_USERPWD, url->proxy_auth_credentials); + curl_easy_setopt(handle, CURLOPT_PROXYUSERPWD, url->proxy_auth_credentials); } - curl_easy_setopt(handle, CURLOPT_HTTPAUTH, url->proxy_auth_method); + curl_easy_setopt(handle, CURLOPT_PROXYAUTH, url->proxy_auth_method); + } } @@ -1315,7 +1316,7 @@ { /* 401 and 407 responses are just authentication challenges, that virtual client may overcome. */ - if (response_status != 401 || response_status != 407) + if (response_status != 401 && response_status != 407) { cctx->client_state = CSTATE_ERROR; } |