@@ -84,7 +84,7 @@ static const char *ssl_cainfo;
static long curl_low_speed_limit = -1;
static long curl_low_speed_time = -1;
#if LIBCURL_VERSION_NUM >= 0x070f05
-static ssize_t curl_max_receive_speed = -1;
+static ssize_t curl_max_receive_speed = 0;
#endif
static int curl_ftp_no_epsv;
static const char *curl_http_proxy;
@@ -983,7 +983,9 @@ static CURL *get_curl_handle(void)
}
#if LIBCURL_VERSION_NUM >= 0x070f05
- if (curl_max_receive_speed > 0)
+ if (curl_max_receive_speed < 0)
+ warning("negative values are ignored for http.maxreceivespeed");
+ else if (curl_max_receive_speed > 0)
curl_easy_setopt(result, CURLOPT_MAX_RECV_SPEED_LARGE,
curl_max_receive_speed);
#endif