]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Pakfire: fix upstream proxy usage
authorPeter Müller <peter.mueller@ipfire.org>
Sat, 11 Apr 2020 10:19:20 +0000 (12:19 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 30 Apr 2020 15:11:42 +0000 (15:11 +0000)
This patch ensures Pakfire will download updates via the configured
upstream proxy (if any) for both HTTP and HTTPS.

Fixes: #12357
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/pakfire/lib/functions.pl

index 45e3427b1ce1d2de1aaa59784dc105dab003581d..17a420c33c1f2d8228241aed775195ca85758270 100644 (file)
@@ -161,10 +161,10 @@ sub fetchfile {
                if ($proxysettings{'UPSTREAM_PROXY'}) {
                        logger("DOWNLOAD INFO: Upstream proxy: \"$proxysettings{'UPSTREAM_PROXY'}\"");
                        if ($proxysettings{'UPSTREAM_USER'}) {
-                               $ua->proxy([["http", "https"] => "http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$proxysettings{'UPSTREAM_PROXY'}/"]);
+                               $ua->proxy(["http", "https"], "http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$proxysettings{'UPSTREAM_PROXY'}/");
                                logger("DOWNLOAD INFO: Logging in with: \"$proxysettings{'UPSTREAM_USER'}\" - \"$proxysettings{'UPSTREAM_PASSWORD'}\"");
                        } else {
-                               $ua->proxy([["http", "https"] => "http://$proxysettings{'UPSTREAM_PROXY'}/"]);
+                               $ua->proxy(["http", "https"], "http://$proxysettings{'UPSTREAM_PROXY'}/");
                        }
                }