diff options
author | damien <damien@mandriva.com> | 2000-11-28 16:56:52 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-11-28 16:56:52 +0000 |
commit | 0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7 (patch) | |
tree | 33f7ac905998f9ad6d85090f777ee4c0d0c67032 /perl-install/http.pm | |
parent | d5c526273db473a7d87a26000585900fc10dda7d (diff) | |
download | drakx-backup-do-not-use-topic/unlabeled-1.1.1.tar drakx-backup-do-not-use-topic/unlabeled-1.1.1.tar.gz drakx-backup-do-not-use-topic/unlabeled-1.1.1.tar.bz2 drakx-backup-do-not-use-topic/unlabeled-1.1.1.tar.xz drakx-backup-do-not-use-topic/unlabeled-1.1.1.zip |
branch to build the firewall install.topic/unlabeled-1.1.1
Diffstat (limited to 'perl-install/http.pm')
-rw-r--r-- | perl-install/http.pm | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/perl-install/http.pm b/perl-install/http.pm index fbf6c001c..eb8ca0a09 100644 --- a/perl-install/http.pm +++ b/perl-install/http.pm @@ -1,17 +1,19 @@ -package http; +package http; # $Id$ use IO::Socket; use install_any; +use network; my $sock; -sub getFile($) { +sub getFile { local($^W) = 0; my ($host, $port, $path) = $ENV{URLPREFIX} =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,; - $path .= "/" . install_any::relGetFile($_[0]); + $host = network::resolv($host); + $path .= "/$_[0]"; $sock->close if $sock; $sock = IO::Socket::INET->new(PeerAddr => $host, @@ -24,6 +26,17 @@ sub getFile($) { "Host: $host" . ($port && ":$port"), "User-Agent: DrakX/vivelinuxabaszindozs", "", ""); + + #- skip until empty line + local $_; + my ($now, $last) = 0; + do { + $last = $now; + sysread($sock, $_, 1) || die; + sysread($sock, $_, 1) || die if /\015/; + $now = /\012/; + } until ($now && $last); + $sock; } |