diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2019-10-21 10:43:03 +0200 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2019-10-23 10:15:39 +0200 |
| commit | 807c056c08bd6314e27148c348d027a808e3a632 (patch) | |
| tree | 2be32daeee2278ae3940e3bb1ea0da99d66bf824 /lib | |
| parent | 2838fd91bef9f776816f2c06e36488f153825a8f (diff) | |
conn-reuse: requests wanting NTLM can reuse non-NTLM connections
Added test case 338 to verify.
Reported-by: Daniel Silverstone
Fixes #4499
Closes #4514
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/url.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1282,8 +1282,14 @@ ConnectionExists(struct Curl_easy *data, partway through a handshake!) */ if(wantNTLMhttp) { if(strcmp(needle->user, check->user) || - strcmp(needle->passwd, check->passwd)) + strcmp(needle->passwd, check->passwd)) { + + /* we prefer a credential match, but this is at least a connection + that can be reused and "upgraded" to NTLM */ + if(check->http_ntlm_state == NTLMSTATE_NONE) + chosen = check; continue; + } } else if(check->http_ntlm_state != NTLMSTATE_NONE) { /* Connection is using NTLM auth but we don't want NTLM */ |
