ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/myhttpd
(Generate patch)

Comparing Coro/eg/myhttpd (file contents):
Revision 1.1 by root, Thu Aug 9 02:57:54 2001 UTC vs.
Revision 1.2 by root, Sat Aug 11 19:59:19 2001 UTC

1#!/usr/bin/perl 1#!/usr/bin/perl
2
3# this is a relatively small web-server, using coroutines
4# for connections. play around with it but do not use
5# it in production. ask myhttpd@plan9.de for a better
6# version that's more usable and bugfixed.
2 7
3use Coro; 8use Coro;
4use Coro::Semaphore; 9use Coro::Semaphore;
5use Coro::Event; 10use Coro::Event;
6use Coro::Socket; 11use Coro::Socket;
227 } 232 }
228 $port = $port == 80 ? "" : ":$port"; 233 $port = $port == 80 ? "" : ":$port";
229 $host.$port; 234 $host.$port;
230} 235}
231 236
237# no, this doesn't do cgi, but it's close enough
238# for the no-longer-used directory indexing script.
232sub _cgi { 239sub _cgi {
233 my $self = shift; 240 my $self = shift;
234 my $path = shift; 241 my $path = shift;
235 my $fh; 242 my $fh;
236 243

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines