]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
pakfire: use HTTPS if no protocol is specified
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 2 Jan 2020 16:12:35 +0000 (16:12 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 2 Jan 2020 16:17:54 +0000 (16:17 +0000)
also use HTTPS on fallback to mainserver if no mirror was left

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/140/filelists/files
src/pakfire/lib/functions.pl

index 80c52449b35db237ab15d743e9db3b9e4ac191fa..181ef8cf480341bfc3adcf2699623a264d343d58 100644 (file)
@@ -5,4 +5,5 @@ var/ipfire/langs
 etc/rc.d/init.d/networking/red.up/06-safe-search
 etc/rc.d/init.d/unbound
 etc/rc.d/init.d/suricata
+opt/pakfire/lib/functions.pl
 srv/web/ipfire/cgi-bin/ids.cgi
index 460eaf303c383721e535c11e02200a920329fc70..61787757eb5e46bcb22996a135161fc667845601 100644 (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