[source] download.pl: fix detecting download errors with curl

LEDE Commits lede-commits at lists.infradead.org
Tue Jan 31 02:24:29 PST 2017


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/74c09e714ea36f3d463e0974cd56c32f752a0ad1

commit 74c09e714ea36f3d463e0974cd56c32f752a0ad1
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jan 31 11:22:21 2017 +0100

    download.pl: fix detecting download errors with curl
    
    Avoid treating error pages as successfully downloaded content
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 scripts/download.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/download.pl b/scripts/download.pl
index 0398c56..7eb7c7e 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)
 	;
 }



More information about the lede-commits mailing list