mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
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:
@@ -1,2 +1,3 @@
|
||||
opt/pakfire/lib/functions.pl
|
||||
srv/web/ipfire/cgi-bin/index.cgi
|
||||
var/ipfire/main/manualpages
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user