summaryrefslogtreecommitdiff
path: root/src/import/curl-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/curl-util.c')
-rw-r--r--src/import/curl-util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/import/curl-util.c b/src/import/curl-util.c
index c124c985b9..94f718de17 100644
--- a/src/import/curl-util.c
+++ b/src/import/curl-util.c
@@ -252,7 +252,11 @@ int curl_glue_make(CURL **ret, const char *url, void *userdata) {
if (curl_easy_setopt(c, CURLOPT_LOW_SPEED_LIMIT, 30L) != CURLE_OK)
return -EIO;
+#if LIBCURL_VERSION_NUM >= 0x075500 /* libcurl 7.85.0 */
+ if (curl_easy_setopt(c, CURLOPT_PROTOCOLS_STR, "HTTP,HTTPS,FILE") != CURLE_OK)
+#else
if (curl_easy_setopt(c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS|CURLPROTO_FILE) != CURLE_OK)
+#endif
return -EIO;
*ret = TAKE_PTR(c);