pakfire: use HTTPS if no protocol is specified

also use HTTPS on fallback to mainserver if no mirror was left

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2020-01-02 16:12:35 +00:00
parent f93238725f
commit c846ed1616
2 changed files with 3 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ sub fetchfile {
$file = $getfile;
}
$proto = "HTTP" unless $proto;
$proto = "HTTPS" unless $proto;
logger("DOWNLOAD INFO: Host: $host ($proto) - File: $file");
@@ -318,7 +318,7 @@ sub selectmirror {
if ($scount eq 0) {
logger("MIRROR INFO: Could not find any servers. Falling back to main server $Conf::mainserver");
return ("HTTP", $Conf::mainserver, "/$Conf::version");
return ("HTTPS", $Conf::mainserver, "/$Conf::version");
}
### Choose a random server and test if it is online