diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-03-25 13:13:18 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-03-25 16:18:13 +0100 |
commit | 7b6bfd2d78cfead3f1dfadbcedc92e4fbb24ff7c (patch) | |
tree | ccf11d0425dc4957bc2c7727d1e58001c360c1cc | |
parent | db4e0bd85f994d14c950f4a7378be550331cf5b0 (diff) | |
download | curl-7b6bfd2d78cfead3f1dfadbcedc92e4fbb24ff7c.tar.gz |
multi: close the connection when h2=>h1 downgrading
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
Closes #6793
-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; |