summaryrefslogtreecommitdiffstats
path: root/perl-install/http.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2001-09-05 12:55:06 +0000
committerMystery Man <unknown@mandriva.org>2001-09-05 12:55:06 +0000
commitec7d8bfda214073d222fcadfa1ac9d3ed884ea87 (patch)
treed17c669ffaea9eae8bbc6b1b82b6164e75c6c42d /perl-install/http.pm
parentd2428470c34f096821615c7f119775b03aa86253 (diff)
downloaddrakx-V_9mdk.tar
drakx-V_9mdk.tar.gz
drakx-V_9mdk.tar.bz2
drakx-V_9mdk.tar.xz
drakx-V_9mdk.zip
This commit was manufactured by cvs2svn to create tag 'V_9mdk'.V_9mdk
Diffstat (limited to 'perl-install/http.pm')
-rw-r--r--perl-install/http.pm41
1 files changed, 0 insertions, 41 deletions
diff --git a/perl-install/http.pm b/perl-install/http.pm
deleted file mode 100644
index d04f90435..000000000
--- a/perl-install/http.pm
+++ /dev/null
@@ -1,41 +0,0 @@
-package http; # $Id$
-
-use IO::Socket;
-use network;
-
-
-my $sock;
-
-sub getFile {
- local($^W) = 0;
-
- my ($host, $port, $path) = $ENV{URLPREFIX} =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,;
- $host = network::resolv($host);
- $path .= "/$_[0]";
-
- $sock->close if $sock;
- $_[0] eq '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 ";
- $sock->autoflush;
- print $sock join("\015\012" =>
- "GET $path HTTP/1.0",
- "Host: $host" . ($port && ":$port"),
- "User-Agent: DrakX/vivelinuxabaszindozs",
- "", "");
-
- #- skip until empty line
- my ($now, $last, $buf, $tmp) = 0;
- my $read = sub { sysread($sock, $buf, 1) || die; $tmp .= $buf };
- do {
- $last = $now;
- &$read; &$read if $buf =~ /\015/;
- $now = $buf =~ /\012/;
- } until ($now && $last);
-
- $tmp =~ /^.*\b200\b/ ? $sock : undef;
-}
-
-1;