From b637ace3685fb35e7de7c4e7cdae0638c80cd45a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 Mar 2013 16:21:08 +0300 Subject: Add missing curl version checks in download class. --- src/net/download.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2