Skip to content
Snippets Groups Projects
Commit f481b3e1 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

bail out properly on a 407 when we can't authenticate basic, bug report

#845247
parent 2769f3b2
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment