← Commit list

33e43985b8

Stefan Eissing
Stefan Eissing
2026-04-02
SUCCESS Duration: 269s

Subject

url: improve connection reuse on negotiate

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/url.c+9 -3
@@ -1085,11 +1085,17 @@ static bool url_match_auth_ntlm(struct connectdata *conn,
if(m->want_ntlm_http) {
if(Curl_timestrcmp(m->needle->user, conn->user) ||
Curl_timestrcmp(m->needle->passwd, conn->passwd)) {
-
/* we prefer a credential match, but this is at least a connection
- that can be reused and "upgraded" to NTLM */
- if(conn->http_ntlm_state == NTLMSTATE_NONE)
+ that can be reused and "upgraded" to NTLM if it does
+ not have any auth ongoing. */
+#ifdef USE_SPNEGO
+ if((conn->http_ntlm_state == NTLMSTATE_NONE)
+ && (conn->http_negotiate_state == GSS_AUTHNONE)) {
+#else
+ if(conn->http_ntlm_state == NTLMSTATE_NONE) {
+#endif
m->found = conn;
+ }
return FALSE;
}
}