10 local $SIG{PIPE
} = 'IGNORE';
12 my $servsock = new IO
::Socket
(
19 ) or die "new IO::Socket: $!";
21 print "to test, enter wmget http://localhost:8000/...\n";
23 while (my $client = $servsock->accept) {
24 $client->autoflush (1);
31 print STDERR
"headers done. sending data...\n";
33 print $client "HTTP/1.0 200 Ok, here you go...\r\n";
34 print $client "Content-Type: text/plain\r\n";
35 print $client "Content-Length: 1000\r\n\r\n";
37 # generate bogus data, and do it slowly....
39 print $client "x" x
99, "\n";