1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

ConnectionExists: respect requests for h1 connections better

... for situations when multiplexing isn't enabled on the h2 connection
and h1 is explicitly requested for the transfer.

Assisted-by: Gergely Nagy
This commit is contained in:
Daniel Stenberg 2021-04-20 10:44:12 +02:00
parent 9c18c0b4dd
commit 9cb48457c6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1315,6 +1315,13 @@ ConnectionExists(struct Curl_easy *data,
}
}
/* If multiplexing isn't enabled on the h2 connection and h1 is
explicitly requested, handle it: */
if((needle->handler->protocol & PROTO_FAMILY_HTTP) &&
(check->httpversion >= 20) &&
(data->state.httpwant < CURL_HTTP_VERSION_2_0))
continue;
if((needle->handler->flags&PROTOPT_SSL)
#ifndef CURL_DISABLE_PROXY
|| !needle->bits.httpproxy || needle->bits.tunnel_proxy