]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
pakfire: Don't give up mirror search on status code 500
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 25 Aug 2023 09:42:23 +0000 (09:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 25 Aug 2023 09:44:38 +0000 (09:44 +0000)
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 <michael.tremer@ipfire.org>
config/rootfiles/core/180/filelists/files
src/pakfire/lib/functions.pl

index 7031204b9da34146aee4a4e1fd84c3ec3995b22c..d08a282a6c72e04283f45527601183619eaaa0df 100644 (file)
@@ -1,2 +1,3 @@
+opt/pakfire/lib/functions.pl
 srv/web/ipfire/cgi-bin/index.cgi
 var/ipfire/main/manualpages
index 4ed70308c9c2b8c5fbfa65db4dabd57ffdfe18a8..e623e8bc3f3fcb5937e7d59e4d6c63745fee6a58 100644 (file)
@@ -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;