1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

avoid proxy (and other) auth if no user+password is given

This commit is contained in:
Daniel Stenberg 2003-09-04 10:08:53 +00:00
parent 40e6b12cca
commit 7410210f19

View File

@ -196,8 +196,10 @@ CURLcode http_auth_headers(struct connectdata *conn,
if(!data->state.authstage) { if(!data->state.authstage) {
if(conn->bits.httpproxy && conn->bits.proxy_user_passwd) if(conn->bits.httpproxy && conn->bits.proxy_user_passwd)
Curl_http_auth_stage(data, 407); Curl_http_auth_stage(data, 407);
else else if(conn->bits.user_passwd)
Curl_http_auth_stage(data, 401); Curl_http_auth_stage(data, 401);
else
return CURLE_OK; /* no authentication with no user or password */
} }
/* To prevent the user+password to get sent to other than the original /* To prevent the user+password to get sent to other than the original