summaryrefslogtreecommitdiffstats
path: root/perl-install/http.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-04 16:41:45 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-04 16:41:45 +0000
commitaa560937696c59232dfdf00f3b493b8f85bf412a (patch)
treefb69a3a5fba8ad2d14714da1ac99265485dd8151 /perl-install/http.pm
parent254cfcd2acdd915bd37e73d36868f26d5b7587fa (diff)
downloaddrakx-backup-do-not-use-aa560937696c59232dfdf00f3b493b8f85bf412a.tar
drakx-backup-do-not-use-aa560937696c59232dfdf00f3b493b8f85bf412a.tar.gz
drakx-backup-do-not-use-aa560937696c59232dfdf00f3b493b8f85bf412a.tar.bz2
drakx-backup-do-not-use-aa560937696c59232dfdf00f3b493b8f85bf412a.tar.xz
drakx-backup-do-not-use-aa560937696c59232dfdf00f3b493b8f85bf412a.zip
added update installation support to install (big modifs need testing).
Diffstat (limited to 'perl-install/http.pm')
-rw-r--r--perl-install/http.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/http.pm b/perl-install/http.pm
index 057764a27..8d1e8d5de 100644
--- a/perl-install/http.pm
+++ b/perl-install/http.pm
@@ -10,15 +10,16 @@ sub getFile {
local($^W) = 0;
my ($url) = @_;
+ $sock->close if $sock;
+ $url =~ m|/XXX$| and return; #- force closing connection.
+
my ($host, $port, $path) = $url =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,;
$host = network::resolv($host);
- $sock->close if $sock;
- $url =~ m|/XXX$| and return; #- force closing connection.
$sock = IO::Socket::INET->new(PeerAddr => $host,
PeerPort => $port || 80,
Proto => 'tcp',
- Timeout => 60) or die "can't connect ";
+ Timeout => 60) or die "can't connect $@";
$sock->autoflush;
print $sock join("\015\012" =>
"GET $path HTTP/1.0",