From: Michael Tremer Date: Fri, 25 Aug 2023 09:42:23 +0000 (+0000) Subject: pakfire: Don't give up mirror search on status code 500 X-Git-Tag: v2.27-core180~96 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=d45c4768f957404167da3595b5663858e9b63dde pakfire: Don't give up mirror search on status code 500 The WWW library seems to report status code 500 for issues like DNS resolving problems and connection timeouts. In that case, we won't go on searching for another functioning mirror, which we should. This patch removes that special break clause. Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/core/180/filelists/files b/config/rootfiles/core/180/filelists/files index 7031204b9d..d08a282a6c 100644 --- a/config/rootfiles/core/180/filelists/files +++ b/config/rootfiles/core/180/filelists/files @@ -1,2 +1,3 @@ +opt/pakfire/lib/functions.pl srv/web/ipfire/cgi-bin/index.cgi var/ipfire/main/manualpages diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 4ed70308c9..e623e8bc3f 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -205,11 +205,6 @@ sub fetchfile { my $log = $response->status_line; logger("DOWNLOAD INFO: HTTP-Status-Code: $code - $log"); - if ( $code eq "500" ) { - message("Giving up: There was no chance to get the file \"$getfile\" from any available server.\nThere was an error on the way. Please fix it."); - return 0; - } - if ($response->is_success) { if (open(FILE, ">$Conf::tmpdir/$bfile")) { print FILE $final_data;