summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-05-22 06:27:59 +0300
committerAndrei Karas <akaras@inbox.ru>2018-05-22 06:27:59 +0300
commit7264fa5f1d9e6ab3cb973c7c80ef224a3f4d2e6b (patch)
tree0c896c6dddacb6e587650d5f9a4d02d51ae9e4a8
parentf471f7b1afe1343b601a3476cd6b7dac577eca63 (diff)
downloadplus-7264fa5f1d9e6ab3cb973c7c80ef224a3f4d2e6b.tar.gz
plus-7264fa5f1d9e6ab3cb973c7c80ef224a3f4d2e6b.tar.bz2
plus-7264fa5f1d9e6ab3cb973c7c80ef224a3f4d2e6b.tar.xz
plus-7264fa5f1d9e6ab3cb973c7c80ef224a3f4d2e6b.zip
Set default protocol in curl.
-rw-r--r--src/net/download.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 073990b07..05f10e027 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -612,6 +612,9 @@ void Download::addHeaders(CURL *const curl A_UNUSED)
void Download::addCommonFlags(CURL *const curl)
{
curl_easy_setopt(curl, CURLOPT_STDERR, logger->getFile());
+#if LIBCURL_VERSION_NUM >= 0x072D00
+ curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "http");
+#endif // LIBCURL_VERSION_NUM >= 0x072D00
}
void Download::prepareForm(curl_httppost **form, const std::string &fileName)