From 76f1b9457d88b9ae2f0f578c10c4155c23c03c24 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 31 Jan 2017 11:22:21 +0100 Subject: [PATCH] download.pl: fix detecting download errors with curl Avoid treating error pages as successfully downloaded content Signed-off-by: Felix Fietkau --- scripts/download.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/download.pl b/scripts/download.pl index 0398c564efd..7eb7c7ebce3 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -82,7 +82,7 @@ sub download_cmd($) { } return $have_curl - ? (qw(curl --connect-timeout 20 --retry 5 --location --insecure), shellwords($ENV{CURL_OPTIONS} || ''), $url) + ? (qw(curl -f --connect-timeout 20 --retry 5 --location --insecure), shellwords($ENV{CURL_OPTIONS} || ''), $url) : (qw(wget --tries=5 --timeout=20 --no-check-certificate --output-document=-), shellwords($ENV{WGET_OPTIONS} || ''), $url) ; } -- 2.30.2