Merge pull request #2886 from daissi/wip/daissi/disable-http2

ostree-fetcher-curl: explicitly use HTTP1.1 when HTTP2 is disabled
This commit is contained in:
Colin Walters 2023-06-15 17:35:45 -04:00 committed by GitHub
commit 95f2c72c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -879,6 +879,12 @@ initiate_next_curl_request (FetcherRequest *req, GTask *task)
#endif
}
if (self->config_flags & OSTREE_FETCHER_FLAGS_DISABLE_HTTP2)
{
rc = curl_easy_setopt (req->easy, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
g_assert_cmpint (rc, ==, CURLM_OK);
}
rc = curl_easy_setopt (req->easy, CURLOPT_WRITEFUNCTION, write_cb);
g_assert_cmpint (rc, ==, CURLM_OK);
rc = curl_easy_setopt (req->easy, CURLOPT_HEADERFUNCTION, response_header_cb);