summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-30 16:21:08 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-30 16:21:08 +0300
commitb637ace3685fb35e7de7c4e7cdae0638c80cd45a (patch)
tree193b2d2706332063f92ebd825ec0ea8380145999 /src/net/download.cpp
parent42bf5e889355c3768b88f0c01ed118737d4a6d37 (diff)
downloadmv-b637ace3685fb35e7de7c4e7cdae0638c80cd45a.tar.gz
mv-b637ace3685fb35e7de7c4e7cdae0638c80cd45a.tar.bz2
mv-b637ace3685fb35e7de7c4e7cdae0638c80cd45a.tar.xz
mv-b637ace3685fb35e7de7c4e7cdae0638c80cd45a.zip
Add missing curl version checks in download class.v1.3.3.31
Diffstat (limited to 'src/net/download.cpp')
-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