CGI-Application-Server
view release on metacpan or search on metacpan
lib/CGI/Application/Server.pm view on Meta::CPAN
sub _serve_response {
my ( $self, $stdout ) = @_;
my $response = $self->_build_response( $stdout );
print $response->as_string();
return 1; # Like ...Simple::Static::serve_static does
}
# Shamelessly stolen from HTTP::Request::AsCGI by chansen
sub _build_response {
my ( $self, $stdout ) = @_;
$stdout =~ s{(.*?\x0d?\x0a\x0d?\x0a)}{}xsm;
my $headers = $1;
unless ( defined $headers ) {
$headers = "HTTP/1.1 500 Internal Server Error\x0d\x0a";
}
lib/CGI/Application/Server.pm view on Meta::CPAN
This is the server's document root where all static files will
be served from.
=head1 CAVEATS
This is a subclass of L<HTTP::Server::Simple> and all of its caveats
apply here as well.
=head1 ACKNOWLEDGEMENTS
The HTTP response handling was shamelessly stolen from L<HTTP::Request::AsCGI>
by chansen
=head1 AUTHORS
=over 4
=item *
Stevan Little <stevan@iinteractive.com>
( run in 0.677 second using v1.01-cache-2.11-cpan-de7293f3b23 )