mirror of
https://github.com/curl/curl.git
synced 2026-07-28 15:23:11 +03:00
fixup improve the logic
This commit is contained in:
parent
699c39efec
commit
bb894e077f
1 changed files with 14 additions and 7 deletions
21
lib/url.c
21
lib/url.c
|
|
@ -1223,13 +1223,20 @@ static bool url_match_auth_nego(struct connectdata *conn,
|
|||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
if((m->want_nego_http &&
|
||||
(conn->http_negotiate_state != GSS_AUTHNONE)) ||
|
||||
(m->want_proxy_nego_http &&
|
||||
(conn->proxy_negotiate_state != GSS_AUTHNONE))) {
|
||||
/* We must use this connection, no other */
|
||||
m->force_reuse = TRUE;
|
||||
return TRUE;
|
||||
if(m->want_ntlm_http || m->want_proxy_ntlm_http) {
|
||||
/* Credentials are already checked, we may use this connection. We MUST
|
||||
* use a connection where it has already been fully negotiated. If it has
|
||||
* not, we keep on looking for a better one. */
|
||||
m->found = conn;
|
||||
if((m->want_nego_http &&
|
||||
(conn->http_negotiate_state != GSS_AUTHNONE)) ||
|
||||
(m->want_proxy_nego_http &&
|
||||
(conn->proxy_negotiate_state != GSS_AUTHNONE))) {
|
||||
/* We must use this connection, no other */
|
||||
m->force_reuse = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE; /* get another */
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue