fixup improve the logic

This commit is contained in:
Daniel Stenberg 2026-02-07 00:03:30 +01:00
parent 699c39efec
commit bb894e077f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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;
}