aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-09-04 10:08:53 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-09-04 10:08:53 +0000
commit7410210f198c88ad9563f6ac5b50218063d91070 (patch)
treef4278bfe4b38b651c488ae3c32007196762263ab /lib
parent40e6b12cca696788a583a716da9265afb9484f8a (diff)
avoid proxy (and other) auth if no user+password is given
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c
index f4d200eeb..3b447dddc 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -196,8 +196,10 @@ CURLcode http_auth_headers(struct connectdata *conn,
if(!data->state.authstage) {
if(conn->bits.httpproxy && conn->bits.proxy_user_passwd)
Curl_http_auth_stage(data, 407);
- else
+ else if(conn->bits.user_passwd)
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