diff options
author | Rider Linden <rider@lindenlab.com> | 2016-02-19 11:18:33 -0800 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2016-10-14 03:16:46 -0400 |
commit | e5f0b1ab43ad62eabc3d3a5254381254ed102c66 (patch) | |
tree | 0258ac9f7278d754d4457c780d201832bad50185 /lib | |
parent | 1671d84b38ac61f0852e8ff2915fef3346dc53f7 (diff) |
url: skip to-be-closed connections when pipelining
No longer attempt to use "doomed" to-be-closed connections when
pipelining. Prior to this change connections marked for deletion (e.g.
timeout) would be erroneously used, resulting in sporadic crashes.
As originally reported and fixed by Carlo Wood (origin unknown).
Bug: https://github.com/curl/curl/issues/627
Reported-by: Rider Linden
Closes https://github.com/curl/curl/pull/1075
Participation-by: nopjmp@users.noreply.github.com
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2908,7 +2908,7 @@ static bool IsPipeliningPossible(const struct Curl_easy *handle, const struct connectdata *conn) { /* If a HTTP protocol and pipelining is enabled */ - if(conn->handler->protocol & PROTO_FAMILY_HTTP) { + if((conn->handler->protocol & PROTO_FAMILY_HTTP) && !conn->bits.close) { if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) && (handle->set.httpversion != CURL_HTTP_VERSION_1_0) && @@ -3283,6 +3283,8 @@ ConnectionExists(struct Curl_easy *data, pipeLen = check->send_pipe->size + check->recv_pipe->size; if(canPipeline) { + if(check->bits.close) + continue; if(!check->bits.multiplex) { /* If not multiplexing, make sure the pipe has only GET requests */ |