__PACKAGE__->mk_accessors(qw[ enviroment request stdin stdout stderr ]);
-our $VERSION = 0.4;
+our $VERSION = 0.5_02;
sub new {
my $class = shift;
$headers .= $line;
last if $headers =~ /\x0d?\x0a\x0d?\x0a$/;
}
-
+
unless ( defined $headers ) {
$headers = "HTTP/1.1 500 Internal Server Error\x0d\x0a";
}
$response->code($code);
$response->message($message);
}
+
+ my $length = ( stat( $self->stdout ) )[7] - tell( $self->stdout );
- if ( $response->code == 500 && !$response->content ) {
+ if ( $response->code == 500 && !$length ) {
$response->content( $response->error_as_HTML );
$response->content_type('text/html');