--- http.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/http.c b/http.c index 12030cf3bc..2e01ebf559 100644 --- a/http.c +++ b/http.c @@ -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 -- 2.28.1.49.gafcb914ae4.dirty.agit.6.3.1