diff options
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 9 |
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}); } |