I use PSI::ESP to address the errors :-)
- Trouble with running the server without -T on the command line - I get this error every time
I try to use taint mode : Too late for -T. I don't know about any way around it except
specifying -T on the command line.
- -h dosen't work. - There is no -h option, so it won't work.
- Connections are not always closed when a child exits. I'm not sure when this happens - my experience showed that IE kept a child alive until either some timeout happened or I closed that IE window (or visited another URL with that window)
- Sending ^C to the server gives a funny error message - This is a "problem" with HTTP::Daemon which seems to want to call a ^C (instead of GET) method. I don't know how to fix this without patching HTTP::Daemon.
- .pl files will be downloaded, even though they are executable and only readable by the user running the webserver. - This works as designed. Everything below the webserver root is exported, and as long as the user under which the webserver is run can read the file it will transfer that file. Note that especially no execution of files is possible.
I'm not keen to add any more features to that server as it would transcend both the line count limit and the complexity limit - also, this server is used to stream 200MB files over my meager 128kbit line, so each child lives a very long time.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The
$d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider
($c = $d->accept())->get_request(); $c->send_response( new #in the
HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web