summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/args.pm6
-rw-r--r--urpm/download.pm4
2 files changed, 5 insertions, 5 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index c55bf10e..1309bda5 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -83,11 +83,11 @@ my %options_spec = (
'resume!' => sub { $urpm->{options}{resume} = $_[1] },
'proxy=s' => sub {
my (undef, $value) = @_;
- my ($proxy, $port) = $value =~ m,^(?:http://)?([^:]+(:\d+)?)/*$,
+ my ($proxy, $port) = $value =~ m,^(?:http://)?([^:/]+(:\d+)?)/*$,
or die N("bad proxy declaration on command line\n");
$proxy .= ":1080" unless $port;
- $urpm->{proxy}{http_proxy} = "http://$proxy"; #- obsolete, for compat
- urpm::download::set_cmdline_proxy(http_proxy => "http://$proxy");
+ $urpm->{proxy}{http_proxy} = "http://$proxy/"; #- obsolete, for compat
+ urpm::download::set_cmdline_proxy(http_proxy => "http://$proxy/");
},
'proxy-user=s' => sub {
my (undef, $value) = @_;
diff --git a/urpm/download.pm b/urpm/download.pm
index 8f46df6d..f94ba20a 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -28,11 +28,11 @@ sub load_proxy_config () {
local $_;
while (<$f>) {
chomp; s/#.*$//; s/^\s*//; s/\s*$//;
- if (/^(?:(.*):\s*)(ftp|http_)proxy\s*=\s*(.*)$/) {
+ if (/^(?:(.*):\s*)?(ftp_proxy|http_proxy)\s*=\s*(.*)$/) {
$proxy_config->{$1 || ''}{$2} = $3;
next;
}
- if (/^(?:(.*):\s*)proxy_user\s*=\s*(.*)(?::(.*))?$/) {
+ if (/^(?:(.*):\s*)?proxy_user\s*=\s*(.*)(?::(.*))?$/) {
$proxy_config->{$1 || ''}{user} = $2;
$proxy_config->{$1 || ''}{pwd} = $3 if defined $3;
next;