mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-26 14:04:12 +03:00
ostree-fetcher-curl: explicitly use HTTP1.1 when HTTP2 is disabled
The current logic to select the HTTP version to be use relies on the fact that curl don't use by default HTTP2. This assumption seems wrong with recent versions of curl. Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
This commit is contained in:
parent
ff805f1c4f
commit
d1ec6cdf86
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user