summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-03-18 10:28:17 +0000
committerThierry Vignaud <tv@mandriva.org>2009-03-18 10:28:17 +0000
commit89f320b782551d53d7231cc863dfbf38fa26acff (patch)
tree5f675a5b70a12ab01717e67de3b11a394f5f5366 /perl-install/install
parent9f83969407e5bda59f3c0903f67e30dd8e6ae842 (diff)
downloaddrakx-89f320b782551d53d7231cc863dfbf38fa26acff.tar
drakx-89f320b782551d53d7231cc863dfbf38fa26acff.tar.gz
drakx-89f320b782551d53d7231cc863dfbf38fa26acff.tar.bz2
drakx-89f320b782551d53d7231cc863dfbf38fa26acff.tar.xz
drakx-89f320b782551d53d7231cc863dfbf38fa26acff.zip
(parse_url) rename as parse_http_url() (similar to ftp.pm)
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/http.pm6
1 files changed, 3 insertions, 3 deletions
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};