diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-04-20 10:44:12 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-04-20 10:44:12 +0200 |
commit | 7e0a0025347eb866def9de847971372dc8b106f4 (patch) | |
tree | 0a051e528b0fbf916a1d3ac278ac81ad422ea4dd | |
parent | 88a7a6d8f3851fdd12741d7ff181d5cc7f1c2bb1 (diff) | |
download | curl-bagder/h1-reuse-not-h2.tar.gz |
ConnectionExists: respect requests for h1 connections betterbagder/h1-reuse-not-h2
... for situations when multiplexing isn't enabled on the h2 connection
and h1 is explicitly requested for the transfer.
Assisted-by: Gergely Nagy
-rw-r--r-- | lib/url.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |