diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-03-25 13:13:18 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-03-25 13:13:45 +0100 |
commit | 8b7977665e8c9f36bd9fe7c2538a14a59deb02c4 (patch) | |
tree | ea47a2417de6416a2218747c9cc19fb1119a71b2 | |
parent | cd7aec95d624259db497ac99e0bcb25172270ad0 (diff) | |
download | curl-bagder/h1h2-downgrade-close.tar.gz |
multi: close the connection when h2=>h1 downgradingbagder/h1h2-downgrade-close
Otherwise libcurl is likely to reuse the connection again in the next
attempt since the connection reuse logic doesn't take downgrades into
account.
Reported-by: Anthony Ramine
Fixes #6788
-rw-r--r-- | lib/multi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index f5bacc17c..5de479322 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -2158,6 +2158,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(!ret) { infof(data, "Downgrades to HTTP/1.1!\n"); + connclose(data->conn, "Disconnect HTTP/2 for HTTP/1"); data->state.httpwant = CURL_HTTP_VERSION_1_1; /* clear the error message bit too as we ignore the one we got */ data->state.errorbuf = FALSE; |