]> granicus.if.org Git - curl/commitdiff
Jörg pointed out that I did this fix wrongly, now authwant is cleared
authorDaniel Stenberg <daniel@haxx.se>
Thu, 4 Sep 2003 11:34:09 +0000 (11:34 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 4 Sep 2003 11:34:09 +0000 (11:34 +0000)
properly if no auth is available

lib/http.c

index c1fc9552a004dff3ff796a0c9e0f8d902fe4297d..69423839730f065d787b032eb9ddc98b01a16809 100644 (file)
@@ -162,6 +162,8 @@ void Curl_http_auth_act(struct connectdata *conn)
 {
   struct SessionHandle *data = conn->data;
 
+  data->state.authwant = CURLAUTH_NONE; /* clear it first */
+
   if(data->state.authavail) {
     if(data->state.authavail & CURLAUTH_GSSNEGOTIATE)
       data->state.authwant = CURLAUTH_GSSNEGOTIATE;
@@ -171,13 +173,11 @@ void Curl_http_auth_act(struct connectdata *conn)
       data->state.authwant = CURLAUTH_NTLM;
     else if(data->state.authavail & CURLAUTH_BASIC)
       data->state.authwant = CURLAUTH_BASIC;
-    else
-      data->state.authwant = CURLAUTH_NONE; /* none */
 
     if(data->state.authwant)
       conn->newurl = strdup(data->change.url); /* clone URL */
+    data->state.authavail = CURLAUTH_NONE; /* clear it here */
   }
-  data->state.authavail = CURLAUTH_NONE; /* clear it here */
 }
 
 /*