summaryrefslogtreecommitdiffstats
path: root/perl-install/ftp.pm
Commit message (Expand)AuthorAgeFilesLines
* no_commentPascal Rigaux2000-03-141-1/+1
* *** empty log message ***Francois Pons2000-01-051-0/+11
* no_commentPascal Rigaux1999-12-071-1/+1
* no_commentPascal Rigaux1999-12-051-3/+3
* no_commentPascal Rigaux1999-11-281-28/+36
* no_commentPascal Rigaux1999-11-251-6/+2
* no_commentPascal Rigaux1999-09-151-2/+2
* no_commentPascal Rigaux1999-08-301-1/+2
* no_commentPascal Rigaux1999-08-291-25/+29
* no_commentPascal Rigaux1999-08-281-0/+49
0644
index 000000000..fbf6c001c
--- /dev/null
+++ b/perl-install/http.pm
@@ -0,0 +1,30 @@
+package http;
+
+use IO::Socket;
+
+use install_any;
+
+
+my $sock;
+
+sub getFile($) {
+ local($^W) = 0;
+
+ my ($host, $port, $path) = $ENV{URLPREFIX} =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,;
+ $path .= "/" . install_any::relGetFile($_[0]);
+
+ $sock->close if $sock;
+ $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",
+ "", "");
+ $sock;
+}
+
+1;