Subject: | uninitialized value in subtraction (-) at Net/Server/HTTP.pm line 427. |
Use of uninitialized value in subtraction (-) at Net/Server/HTTP.pm
line 427.
Use of uninitialized value in localtime at Net/Server/HTTP.pm line
497.
When the access is denied through allow/deny rules,
Net::Server::HTTP::_init_http_request_info is never called, but
Net::Server::HTTP::post_process_request and log_http_request rely on
$info->{'begin'}, which is set by _init_http_request_info().
As workaround I initialize $info->{'begin'} = time in
post_process_request, see attachment.
Subject: | Net-Server-2.006_workaround_unef_begin-prop.diff |
diff -r 42639e024a2e Net/Server/HTTP.pm
--- a/Net/Server/HTTP.pm Tue Aug 07 10:50:07 2012 +0200
+++ b/Net/Server/HTTP.pm Tue Aug 07 11:08:09 2012 +0200
@@ -424,6 +424,7 @@
sub post_process_request {
my $self = shift;
my $info = $self->{'request_info'};
+ $info->{begin} = time unless defined $info->{begin};
$info->{'elapsed'} = time - $info->{'begin'};
$self->SUPER::post_process_request(@_);
$self->log_http_request($info);