mirror of
https://github.com/curl/curl.git
synced 2026-08-04 15:36:18 +03:00
c-hyper: handle HTTP/1.1 => HTTP/1.0 downgrade on reused connection
Enable test 1074 Closes #7617
This commit is contained in:
parent
38941ad6f3
commit
e5d77dc2ca
4 changed files with 11 additions and 7 deletions
|
|
@ -257,6 +257,9 @@ static CURLcode status_line(struct Curl_easy *data,
|
|||
conn->httpversion =
|
||||
http_version == HYPER_HTTP_VERSION_1_1 ? 11 :
|
||||
(http_version == HYPER_HTTP_VERSION_2 ? 20 : 10);
|
||||
if(http_version == HYPER_HTTP_VERSION_1_0)
|
||||
data->state.httpwant = CURL_HTTP_VERSION_1_0;
|
||||
|
||||
data->req.httpcode = http_status;
|
||||
|
||||
result = Curl_http_statusline(data, conn);
|
||||
|
|
@ -900,7 +903,7 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
|
|||
goto error;
|
||||
}
|
||||
|
||||
if(data->state.httpwant == CURL_HTTP_VERSION_1_0) {
|
||||
if(!Curl_use_http_1_1plus(data, conn)) {
|
||||
if(HYPERE_OK != hyper_request_set_version(req,
|
||||
HYPER_HTTP_VERSION_1_0)) {
|
||||
failf(data, "error setting HTTP version");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue