about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-06-28T17·58+0200
committerGitHub <noreply@github.com>2019-06-28T17·58+0200
commit5c8f4772836cc14393068a9adce642da224615c4 (patch)
tree73b029b529c6aea6d0e971a2cd6455d3802b1e0e /src/libstore
parent6847c9278840edc97f1ef85b5fafac4338fb1b37 (diff)
parentec58ba38c55a3ab61fdb1da7d746251e4887ea2c (diff)
Merge pull request #2977 from aniketd/2971-cannot-disable-http2
Fix `http2 = false` having no effect.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/download.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 6ce9525c38de..0c5a73ea3c51 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -244,6 +244,8 @@ struct CurlDownloader : public Downloader
             #if LIBCURL_VERSION_NUM >= 0x072f00
             if (downloadSettings.enableHttp2)
                 curl_easy_setopt(req, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
+            else
+                curl_easy_setopt(req, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
             #endif
             curl_easy_setopt(req, CURLOPT_WRITEFUNCTION, DownloadItem::writeCallbackWrapper);
             curl_easy_setopt(req, CURLOPT_WRITEDATA, this);