Net-HTTPServer
view release on metacpan or search on metacpan
0.8
===
- Fixed but in writing. If there was an error on write the server was
sent spinning into an endless loop.
- Fixed bug in win32 nonblocking. Thanks to Bytewolf and dliouville
for finding this.
0.7
===
- Fixed IO::Socket::SSL interface problem. Accessing multiple pages
would result in SSL errors about not having a context. The lesson
for the day is: Forking does weird things. In this case it
*appears* that the SSL part of the socket was being closed when we
sent the web page. Much reading shows us the SSL_no_shutdown option
to close does not shutdown the SSL. This seems to fix the problem.
- Reworked forking inner loop. There were some performance issues.
0.6.5
=====
- Removed a rogue debug statement.
0.5
===
- Fixed bug with SSL support. I had hard coded paths and a bad check
for the SSL options.
0.4
===
- Allow for the reponse to be a FileHandle that _send will read and send
in one go. This should make serving files faster (at least big files).
- Fixed typo and mistake in logic with IO::Socket::SSL check.
0.3
===
- Fixed logic to check for IO::Socket::SSL (didn't work very well with
Perl2Exe).
- Added tests for make test.
0.2
===
- Fixed bug in read code where it would not finish reading a request.
- If IO::Socket::SSL is installed, you can run a secure server.
- Added a preforking server type "forking" (default is "single"). You can
confiugre the number of child processes via the numproc config option.
0.1
===
- Auto-find the mime.types in the module directories.
- Port scanning for embeded on the fly servers.
- Redirects directories without / to same dir with /: foo/bar -> foo/bar/
- Lists directories
- Serves files
- lots lots more
Ryan Eatmon
reatmon@mail.com
REQUIREMENTS
- URI - Handles all of the URL magic
OPTIONAL
- IO::Socket::SSL - Allows for a secure web server
- MIME::Base64 - Allows for Basic Authentication
- Digest::MD5 - Allows for Digest Autentication
INSTALLATION
perl Makefile.PL
make
make install
STATUS
lib/Net/HTTPServer.pm view on Meta::CPAN
$VERSION = "1.1.1";
$ALLOWED{GET} = 1;
$ALLOWED{HEAD} = 1;
$ALLOWED{OPTIONS} = 1;
$ALLOWED{POST} = 1;
$ALLOWED{TRACE} = 1;
#------------------------------------------------------------------------------
# Do we have IO::Socket::SSL for https support?
#------------------------------------------------------------------------------
if (eval "require IO::Socket::SSL;")
{
require IO::Socket::SSL;
import IO::Socket::SSL;
$SSL = 1;
}
else
{
$SSL = 0;
}
#------------------------------------------------------------------------------
# Do we have MIME::Base64 for Basic Authentication support?
#------------------------------------------------------------------------------
lib/Net/HTTPServer.pm view on Meta::CPAN
else
{
if (!defined($self->{CFG}->{SSL_KEY}) ||
!defined($self->{CFG}->{SSL_CERT}) ||
!defined($self->{CFG}->{SSL_CA}))
{
croak("You must specify ssl_key, ssl_cert, and ssl_ca if you want to use SSL.");
return;
}
$self->_debug("INIT","Start: Create an SSL socket.");
$self->{SOCK} = new IO::Socket::SSL(LocalPort=>$port,
Proto=>"tcp",
Listen=>10,
Reuse=>1,
SSL_key_file=>$self->{CFG}->{SSL_KEY},
SSL_cert_file=>$self->{CFG}->{SSL_CERT},
SSL_ca_file=>$self->{CFG}->{SSL_CA},
SSL_verify_mode=> 0x01,
(($^O ne "MSWin32") ?
(Blocking=>0) :
()
lib/Net/HTTPServer.pm view on Meta::CPAN
if (!defined($self->{SOCK}))
{
$self->_log("Could not start the server...");
if ($self->{CFG}->{SSL} == 0)
{
carp("Could not start the server: $!");
}
else
{
carp("Could not start the server: ",&IO::Socket::SSL::errstr);
}
return;
}
$self->{SELECT} = new IO::Select($self->{SOCK});
if ($self->{CFG}->{TYPE} eq "forking")
{
$self->_debug("INIT","Start: Initializing forking");
( run in 0.281 second using v1.01-cache-2.11-cpan-05444aca049 )