mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
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.
This commit is contained in:
parent
9291a34d5d
commit
aec0c993cb
@ -2908,7 +2908,8 @@ static bool IsPipeliningPossible(const struct Curl_easy *handle,
|
|||||||
const struct connectdata *conn)
|
const struct connectdata *conn)
|
||||||
{
|
{
|
||||||
/* If a HTTP protocol and pipelining is enabled */
|
/* 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) &&
|
if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
|
||||||
(handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
(handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
||||||
@ -3283,7 +3284,7 @@ ConnectionExists(struct Curl_easy *data,
|
|||||||
pipeLen = check->send_pipe->size + check->recv_pipe->size;
|
pipeLen = check->send_pipe->size + check->recv_pipe->size;
|
||||||
|
|
||||||
if(canPipeline) {
|
if(canPipeline) {
|
||||||
if(check->bits.close)
|
if(check->bits.protoconnstart && check->bits.close)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(!check->bits.multiplex) {
|
if(!check->bits.multiplex) {
|
||||||
|
Loading…
Reference in New Issue
Block a user