diff --git a/Changes b/Changes index 4111188..3c6139c 100644 --- a/Changes +++ b/Changes @@ -35,6 +35,7 @@ N.N.N - DD-MMM-2015 - Fixed to show the memory usage correctly in 'phpapc.pm'. - Fixed in 'zfs.pm' to convert FRAG to a numeric value if it's not used in the pool. [#138] +- Fixed a possible uninitialized value in 'HTTPServer.pm' at line 37. 3.8.1 - 13-Nov-2015 diff --git a/lib/HTTPServer.pm b/lib/HTTPServer.pm index 103545e..42d830e 100644 --- a/lib/HTTPServer.pm +++ b/lib/HTTPServer.pm @@ -34,7 +34,7 @@ sub logger { if(open(OUT, ">> $main::config{httpd_builtin}->{log_file}")) { if($type eq "OK") { - print OUT localtime() . " - $type - [$ENV{REMOTE_ADDR}] \"$ENV{REQUEST_METHOD} $url - $ENV{HTTP_USER_AGENT}\"\n"; + print OUT localtime() . " - $type - [$ENV{REMOTE_ADDR}] \"$ENV{REQUEST_METHOD} $url - " . ($ENV{HTTP_USER_AGENT} || "") . "\"\n"; } elsif($type eq "NOTEXIST") { print OUT localtime() . " - $type - [$ENV{REMOTE_ADDR}] File does not exist: $url\n"; } elsif($type eq "AUTHERR") {