diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-11-20 09:53:42 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-11-20 09:53:42 +0000 |
commit | f481b3e1dc2428783cbafa3839e56d26444c24d4 (patch) | |
tree | a0a86dfa2d4b691a1826dc721c5ba9f54693b7e5 | |
parent | 2769f3b2452cc208d5cb043ab388b79f3efa8864 (diff) |
bail out properly on a 407 when we can't authenticate basic, bug report
#845247
-rw-r--r-- | lib/http.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/http.c b/lib/http.c index 9d01ef87a..d7496ecde 100644 --- a/lib/http.c +++ b/lib/http.c @@ -402,8 +402,9 @@ CURLcode Curl_http_auth(struct connectdata *conn, } else if(checkprefix("Basic", start)) { *availp |= CURLAUTH_BASIC; - if((data->state.authwant == CURLAUTH_BASIC) && (httpcode == 401)) { - /* We asked for Basic authentication but got a 401 back + if((data->state.authwant == CURLAUTH_BASIC) && + (httpcode == data->state.authstage)) { + /* We asked for Basic authentication but got a 40X back anyway, which basicly means our name+password isn't valid. */ data->state.authavail = CURLAUTH_NONE; |