mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:13:32 +03:00
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
This commit is contained in:
parent
db4e0bd85f
commit
7b6bfd2d78
1 changed files with 1 additions and 0 deletions
|
|
@ -2158,6 +2158,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
||||||
|
|
||||||
if(!ret) {
|
if(!ret) {
|
||||||
infof(data, "Downgrades to HTTP/1.1!\n");
|
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;
|
data->state.httpwant = CURL_HTTP_VERSION_1_1;
|
||||||
/* clear the error message bit too as we ignore the one we got */
|
/* clear the error message bit too as we ignore the one we got */
|
||||||
data->state.errorbuf = FALSE;
|
data->state.errorbuf = FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue