diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-11-25 02:21:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-11-25 02:21:17 +0000 |
commit | 7a08dbc23f114bf6b6eae275e21e63b6667a1b37 (patch) | |
tree | c99d2cf8a7c5e28215d574b7164de0a387004016 /perl-install/http.pm | |
parent | 949ab0f0941e3266d8ab79380399dfe6a0020aea (diff) | |
download | drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.gz drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.bz2 drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.tar.xz drakx-7a08dbc23f114bf6b6eae275e21e63b6667a1b37.zip |
no_comment
Diffstat (limited to 'perl-install/http.pm')
-rw-r--r-- | perl-install/http.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/http.pm b/perl-install/http.pm index fbf6c001c..9da302513 100644 --- a/perl-install/http.pm +++ b/perl-install/http.pm @@ -3,6 +3,7 @@ package http; use IO::Socket; use install_any; +use network; my $sock; @@ -11,6 +12,7 @@ sub getFile($) { local($^W) = 0; my ($host, $port, $path) = $ENV{URLPREFIX} =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,; + $host = network::resolv($host); $path .= "/" . install_any::relGetFile($_[0]); $sock->close if $sock; @@ -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; } |