This isn't so much a question as it is an informal article for the record, since the question seems to pop up from time to time... but i'll take any advice for making a better version.
HTTP::Server::Simple (or HSS for short) and its ::CGI companion are quite handy. In fact so handy, i'm using it in my Maplat project. The questions that pop up from time seem to revolve around three topics:
- How do i make HSS a forking/preforking webserver?
- How do i implement HTTPS (=HTTP+SSL)?
- Is there *any* way to implement IPv6 in HSS?
I've been pondering about exactly these issues for quite a while, something like two years in fact. HSS is quite extendable, but it involves overloading an "online patching". While it's certainly possible to do it, for a novice it's quite difficult or even impossible to get it right.
I therefore proudly present
HTTP::Server::Simple::CGI::PreFork. While you still have to read a lot of documentation (and annotate mine...), it does the overloading and patching for you. It seems to run quite stable, but looking at the code is only for the faint of heart (mostly code quality issues, i'm afraid).
It fixes the three main questions above, namely it has:
- Preforking option (Single threaded by default for debugging)
- SSL support (throws a lot of warning, though)
- IPv6 support when the correct Net::Server version is installed
Except for the additional options, it should work as a plugin replacement for HTTP::Server::Simple::CGI.
Note: If you want to run SSL and Non-SSL, you have to start two instances of your server.
Any comments, patches and fixed POD is very welcome!
Don't use '#ff0000':
use Acme::AutoColor; my $redcolor = RED();
All colors subject to change without notice.