mirror of https://github.com/moparisthebest/curl
connectionexists: follow-up to fd9d3a1ef1
PROTOPT_CREDSPERREQUEST still needs to be checked even when NTLM is not enabled. Mistake-caught-by: Kamil Dudka
This commit is contained in:
parent
fd9d3a1ef1
commit
85c45d153b
11
lib/url.c
11
lib/url.c
|
@ -3210,9 +3210,11 @@ ConnectionExists(struct SessionHandle *data,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USE_NTLM)
|
if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST))
|
||||||
if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
|
#ifdef USE_NTLM
|
||||||
(wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
|
|| (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
/* This protocol requires credentials per connection or is HTTP+NTLM,
|
/* This protocol requires credentials per connection or is HTTP+NTLM,
|
||||||
so verify that we're using the same name and password as well */
|
so verify that we're using the same name and password as well */
|
||||||
if(!strequal(needle->user, check->user) ||
|
if(!strequal(needle->user, check->user) ||
|
||||||
|
@ -3220,9 +3222,10 @@ ConnectionExists(struct SessionHandle *data,
|
||||||
/* one of them was different */
|
/* one of them was different */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#if defined(USE_NTLM)
|
||||||
credentialsMatch = TRUE;
|
credentialsMatch = TRUE;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
|
if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
|
||||||
(needle->bits.httpproxy && check->bits.httpproxy &&
|
(needle->bits.httpproxy && check->bits.httpproxy &&
|
||||||
|
|
Loading…
Reference in New Issue