From fece8f144f24a45fbbdb92ac2bcbe017379c09d3 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 23 Jan 2003 09:30:51 +0000 Subject: fixed proxy management according to idea from bug 994. --- urpm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urpm.pm b/urpm.pm index 9e7164bf..d6790d42 100644 --- a/urpm.pm +++ b/urpm.pm @@ -226,7 +226,7 @@ sub sync_wget { my $options = shift @_; my ($buf, $file) = ('', undef); open WGET, "-|", "/usr/bin/wget", - (ref $options && set_proxy({type => "wget", proxy => $options->{proxy}})), + (ref $options && $options->{proxy} ? set_proxy({type => "wget", proxy => $options->{proxy}}) : ()), (ref $options && $options->{callback} ? ("--progress=bar:force", "-o", "-") : ref $options && $options->{quiet} ? ("-q") : ("")), "--retr-symlinks", "-NP", @@ -271,7 +271,7 @@ sub sync_curl { #- prepare to get back size and time stamp of each file. open CURL, "/usr/bin/curl" . - " " . (ref $options && set_proxy({type => "curl", proxy => $options->{proxy}})) . + " " . (ref $options && $options->{proxy} ? set_proxy({type => "curl", proxy => $options->{proxy}}) : ()) . " -s -I " . join(" ", map { "'$_'" } @ftp_files) . " |"; while () { if (/Content-Length:\s*(\d+)/) { -- cgit v1.2.1