diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-30 16:21:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-30 16:21:08 +0300 |
commit | b637ace3685fb35e7de7c4e7cdae0638c80cd45a (patch) | |
tree | 193b2d2706332063f92ebd825ec0ea8380145999 /src/net | |
parent | 42bf5e889355c3768b88f0c01ed118737d4a6d37 (diff) | |
download | manaplus-b637ace3685fb35e7de7c4e7cdae0638c80cd45a.tar.gz manaplus-b637ace3685fb35e7de7c4e7cdae0638c80cd45a.tar.bz2 manaplus-b637ace3685fb35e7de7c4e7cdae0638c80cd45a.tar.xz manaplus-b637ace3685fb35e7de7c4e7cdae0638c80cd45a.zip |
Add missing curl version checks in download class.v1.3.3.31
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/download.cpp | 8 |
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 |