summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/download.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index a4ca23198..05cbd110a 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -421,7 +421,9 @@ void Download::addProxy(CURL *const curl)
#endif
break;
case 6: // SOCKS5
+#if CURLVERSION_ATLEAST(7, 18, 0)
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
+#endif
break;
case 7: // SOCKS5 hostname
#if CURLVERSION_ATLEAST(7, 18, 0)
@@ -434,12 +436,18 @@ void Download::addProxy(CURL *const curl)
void Download::secureCurl(CURL *const curl)
{
+#if CURLVERSION_ATLEAST(7, 19, 4)
curl_easy_setopt(curl, CURLOPT_PROTOCOLS,
CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS,
CURLPROTO_HTTP | CURLPROTO_HTTPS);
+#endif
+#if CURLVERSION_ATLEAST(7, 21, 0)
curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 0);
+#endif
+#if CURLVERSION_ATLEAST(7, 15, 1)
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3);
+#endif
}
} // namespace Net