Merge pull request #2977 from aniketd/2971-cannot-disable-http2

Fix `http2 = false` having no effect.
This commit is contained in:
Eelco Dolstra
2019-06-28 19:58:42 +02:00
committed by GitHub
+2
View File
@@ -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);