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 <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2023-08-25 09:42:23 +00:00
parent 84d0ccd6bc
commit d45c4768f9
2 changed files with 1 additions and 5 deletions

View File

@@ -1,2 +1,3 @@
opt/pakfire/lib/functions.pl
srv/web/ipfire/cgi-bin/index.cgi
var/ipfire/main/manualpages

View 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;