From 89f320b782551d53d7231cc863dfbf38fa26acff Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 18 Mar 2009 10:28:17 +0000 Subject: (parse_url) rename as parse_http_url() (similar to ftp.pm) --- perl-install/install/http.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install/install/http.pm') diff --git a/perl-install/install/http.pm b/perl-install/install/http.pm index bf59c273b..cacce8b0d 100644 --- a/perl-install/install/http.pm +++ b/perl-install/install/http.pm @@ -15,7 +15,7 @@ sub getFile { $fh; } -sub parse_url { +sub parse_http_url { my ($url) = @_; $url =~ m,^(?:http|ftp)://([^/:]+)(?::(\d+))?(/\S*)?$,; } @@ -24,7 +24,7 @@ sub get_file_and_size_ { my ($f, $url) = @_; if ($f =~ m!^/!) { - my ($host, $port, $_path) = parse_url($url); + my ($host, $port, $_path) = parse_http_url($url); get_file_and_size("http://$host" . ($port ? ":$port" : '') . $f); } else { get_file_and_size("$url/$f"); @@ -38,7 +38,7 @@ sub get_file_and_size { $sock->close if $sock; # can be used for ftp urls (with http proxy) - my ($host, $port, $path) = parse_url($url); + my ($host, $port, $path) = parse_http_url($url); defined $host or return undef; my $use_http_proxy = $ENV{PROXY} && $ENV{PROXYPORT}; -- cgit v1.2.1