aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2016-10-17 02:44:39 -0400
committerJay Satiro <raysatiro@yahoo.com>2016-10-17 02:44:39 -0400
commitaec0c993cb087ae211dcea7f0b0f04c6b7422599 (patch)
treef2ea69d7ac682683ae51f93e7933dff6f940afb7
parent9291a34d5dbefb8b0524cff537f820cedeb08fc7 (diff)
url: skip to-be-closed connections when pipelining (follow-up)
- Change back behavior so that pipelining is considered possible for connections that have not yet reached the protocol level. This is a follow-up to e5f0b1a which had changed the behavior of checking if pipelining is possible to ignore connections that had 'bits.close' set. Connections that have not yet reached the protocol level also have that bit set, and we need to consider pipelining possible on those connections.
-rw-r--r--lib/url.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index 5e1a0c32f..fbe10a8cb 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2908,7 +2908,8 @@ 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) && !conn->bits.close) {
+ if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
+ (!conn->bits.protoconnstart || !conn->bits.close)) {
if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
(handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
@@ -3283,8 +3284,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.protoconnstart && check->bits.close)
+ continue;
if(!check->bits.multiplex) {
/* If not multiplexing, make sure the pipe has only GET requests */