diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-02-20 23:51:36 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-03-25 23:01:37 +0100 |
commit | 517b06d657aceb11a234b05cc891170c367ab80d (patch) | |
tree | 8b7b919e916f955f04367ad34b19340e37e9e930 /lib/url.c | |
parent | e798e6759b14f4020c63ec456f5c951043e891aa (diff) |
url: Fixed connection re-use when using different log-in credentials
In addition to FTP, other connection based protocols such as IMAP, POP3,
SMTP, SCP, SFTP and LDAP require a new connection when different log-in
credentials are specified. Fixed the detection logic to include these
other protocols.
Bug: http://curl.haxx.se/docs/adv_20140326A.html
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -3060,9 +3060,10 @@ ConnectionExists(struct SessionHandle *data, continue; } - if((needle->handler->protocol & CURLPROTO_FTP) || wantNTLMhttp) { - /* This is FTP or HTTP+NTLM, verify that we're using the same name - and password as well */ + if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) || + wantNTLMhttp) { + /* This protocol requires credentials per connection or is HTTP+NTLM, + so verify that we're using the same name and password as well */ if(!strequal(needle->user, check->user) || !strequal(needle->passwd, check->passwd)) { /* one of them was different */ |