diff options
author | Chris Paulson-Ellis <chris@paulson-ellis.org> | 2020-08-29 18:26:50 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-08-30 16:59:16 +0200 |
commit | 728f8d3bdc336e3fa838f45cad6c0133a6b604ae (patch) | |
tree | 50206e2bcbb1ae7f994680e596363ce3a49634e4 /lib | |
parent | 8b69ac0c10e8c718e97c3e0465629a77d499aace (diff) | |
download | curl-728f8d3bdc336e3fa838f45cad6c0133a6b604ae.tar.gz |
conn: check for connection being dead before reuse
Prevents incorrect reuse of an HTTP connection that has been prematurely
shutdown() by the server.
Partial revert of 755083d00deb16
Fixes #5884
Closes #5893
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1120,6 +1120,12 @@ ConnectionExists(struct Curl_easy *data, /* connect-only or to-be-closed connections will not be reused */ continue; + if(extract_if_dead(check, data)) { + /* disconnect it */ + (void)Curl_disconnect(data, check, /* dead_connection */TRUE); + continue; + } + if(bundle->multiuse == BUNDLE_MULTIPLEX) multiplexed = CONN_INUSE(check); |