summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-18 03:30:17 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-18 03:30:17 +0300
commit37d798e82c029b4cbd2c773266b851b2bf78e920 (patch)
treefb2aebb557d6606e8e90e661f4f9fde1224d5671 /src
parentc55d293a56855842884f1f526834bf1884f36043 (diff)
downloadplus-37d798e82c029b4cbd2c773266b851b2bf78e920.tar.gz
plus-37d798e82c029b4cbd2c773266b851b2bf78e920.tar.bz2
plus-37d798e82c029b4cbd2c773266b851b2bf78e920.tar.xz
plus-37d798e82c029b4cbd2c773266b851b2bf78e920.zip
Limit each downloaded file by curl to 536870912 bytes.
Diffstat (limited to 'src')
-rw-r--r--src/net/download.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 8fd8bfd1e..45f2989c0 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -562,7 +562,7 @@ void Download::addProxy(CURL *const curl)
}
}
-#if LIBCURL_VERSION_NUM >= 0x070f01
+#if LIBCURL_VERSION_NUM >= 0x070a08
void Download::secureCurl(CURL *const curl)
#else // LIBCURL_VERSION_NUM >= 0x070f01
void Download::secureCurl(CURL *const curl A_UNUSED)
@@ -580,6 +580,9 @@ void Download::secureCurl(CURL *const curl A_UNUSED)
#if LIBCURL_VERSION_NUM >= 0x070f01
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3);
#endif // LIBCURL_VERSION_NUM >= 0x070f01
+#if LIBCURL_VERSION_NUM >= 0x070a08
+ curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 536870912);
+#endif // LIBCURL_VERSION_NUM >= 0x070a08
}
#if LIBCURL_VERSION_NUM >= 0x071507