summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-04-20 10:44:12 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-04-21 08:20:24 +0200
commit9cb48457c6a9db533d6759a31a49ba13f1bc591b (patch)
tree65669c3003a8ab6c66a8b864475fe84f6b4d2815 /lib/url.c
parent9c18c0b4dd8f00ed60f0c1994138afe556428114 (diff)
downloadcurl-9cb48457c6a9db533d6759a31a49ba13f1bc591b.tar.gz
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
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 949e380aa..c5e59ea99 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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