diff options
author | Colin Walters <walters@verbum.org> | 2017-12-06 17:07:48 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-07 19:08:01 +0000 |
commit | 7173ac76bc1930eaa592417ea52dce308842d2a7 (patch) | |
tree | 718323297b91a71ca5832541dcb13d738b8f31b1 /src/libostree/ostree-fetcher-curl.c | |
parent | 3f4506f088b17fa0db7929fc4818f11f9ad1396b (diff) | |
download | ostree-7173ac76bc1930eaa592417ea52dce308842d2a7.tar.gz |
pull: Add http2=false remote config option
This seems to work around
https://github.com/ostreedev/ostree/issues/1362
Though I'm not entirely sure why yet. But at least with this it'll be easier for
people to work around things locally.
Closes: #1368
Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-fetcher-curl.c')
-rw-r--r-- | src/libostree/ostree-fetcher-curl.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c index 58835529..a233a191 100644 --- a/src/libostree/ostree-fetcher-curl.c +++ b/src/libostree/ostree-fetcher-curl.c @@ -771,14 +771,17 @@ initiate_next_curl_request (FetcherRequest *req, * there are numerous HTTP/2 fixes since the original version in * libcurl 7.43.0. */ + if (!(self->config_flags & OSTREE_FETCHER_FLAGS_DISABLE_HTTP2)) + { #if CURL_AT_LEAST_VERSION(7, 51, 0) - curl_easy_setopt (req->easy, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); + curl_easy_setopt (req->easy, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); #endif - /* https://github.com/curl/curl/blob/curl-7_53_0/docs/examples/http2-download.c */ + /* https://github.com/curl/curl/blob/curl-7_53_0/docs/examples/http2-download.c */ #if (CURLPIPE_MULTIPLEX > 0) - /* wait for pipe connection to confirm */ - curl_easy_setopt (req->easy, CURLOPT_PIPEWAIT, 1L); + /* wait for pipe connection to confirm */ + curl_easy_setopt (req->easy, CURLOPT_PIPEWAIT, 1L); #endif + } curl_easy_setopt (req->easy, CURLOPT_WRITEFUNCTION, write_cb); if (g_getenv ("OSTREE_DEBUG_HTTP")) curl_easy_setopt (req->easy, CURLOPT_VERBOSE, 1L); |