From 930d03680fb46396774926d00079c699112bf275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Lefebvre?= Date: Mon, 11 May 2009 15:19:21 +0000 Subject: fix aria2 proxy parameters --- urpm/download.pm | 9 +++++---- 1 file 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}); } -- cgit v1.2.1