summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
authorAurélien Lefebvre <alefebvre@mandriva.com>2009-05-11 15:19:21 +0000
committerAurélien Lefebvre <alefebvre@mandriva.com>2009-05-11 15:19:21 +0000
commit930d03680fb46396774926d00079c699112bf275 (patch)
tree9becc34e6a85050d98e53ee0e88c9e550feb4991 /urpm/download.pm
parent872f22f3c89593dc7f3d9844c6938bf33448b2d4 (diff)
downloadurpmi-930d03680fb46396774926d00079c699112bf275.tar
urpmi-930d03680fb46396774926d00079c699112bf275.tar.gz
urpmi-930d03680fb46396774926d00079c699112bf275.tar.bz2
urpmi-930d03680fb46396774926d00079c699112bf275.tar.xz
urpmi-930d03680fb46396774926d00079c699112bf275.zip
fix aria2 proxy parameters
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 97f0448f..63478f26 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -249,11 +249,12 @@ sub set_proxy {
push @res, '-H', 'Pragma:' if @res;
} elsif ($proxy->{type} =~ /\baria2\b/) {
if (my ($http_proxy) = $p->{http_proxy} && parse_http_proxy($p->{http_proxy})) {
- push @res, ('--http-proxy', $http_proxy);
+ my $allproxy = $p->{user};
+ $allproxy .= ":" . $p->{pwd} if $p->{pwd};
+ $allproxy .= "@";
+ $allproxy .= $http_proxy;
+ @res = ("--all-proxy=http://$allproxy");
}
- push @res, ('--http-proxy', $p->{ftp_proxy}) if defined $p->{ftp_proxy};
- push @res, ("--http-proxy-user=$p->{user}", "--http-proxy-passwd=$p->{pwd}")
- if defined $p->{user} && defined $p->{pwd};
} else {
die N("Unknown webfetch `%s' !!!\n", $proxy->{type});
}