]> granicus.if.org Git - curl/commitdiff
connectionexists: follow-up to fd9d3a1ef1f
authorDaniel Stenberg <daniel@haxx.se>
Wed, 22 Apr 2015 11:58:10 +0000 (13:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 22 Apr 2015 11:59:04 +0000 (13:59 +0200)
PROTOPT_CREDSPERREQUEST still needs to be checked even when NTLM is not
enabled.

Mistake-caught-by: Kamil Dudka
lib/url.c

index 93f15f1644e08b16b1f5f282e15dfc94a406d5a3..7dc5c454624adf7684e068ab038f7cc4c1c2be8c 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -3210,9 +3210,11 @@ ConnectionExists(struct SessionHandle *data,
           continue;
       }
 
-#if defined(USE_NTLM)
-      if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
-         (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
+      if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST))
+#ifdef USE_NTLM
+         || (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)
+#endif
+        ) {
         /* This protocol requires credentials per connection or is HTTP+NTLM,
            so verify that we're using the same name and password as well */
         if(!strequal(needle->user, check->user) ||
@@ -3220,9 +3222,10 @@ ConnectionExists(struct SessionHandle *data,
           /* one of them was different */
           continue;
         }
+#if defined(USE_NTLM)
         credentialsMatch = TRUE;
-      }
 #endif
+      }
 
       if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
          (needle->bits.httpproxy && check->bits.httpproxy &&