use strict;
use warnings;
-our $VERSION = '3.21';
+our $VERSION = '3.23';
# Subs in this package:
# _default_error($plain, $html) Default error handler
print "Status: $type\nContent-Type: text/html\n\n",
qq{<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html>},
"<head>\n<title>$type $short</title>\n</head></body>\n<h1>$short",
- "</h1>\n$long<p>\n<hr>\n$ENV{SERVER_SIGNATURE}</body></html>";
+ "</h1>\n$long<p>\n<hr>\n";
+ print $ENV{SERVER_SIGNATURE} if $ENV{SERVER_SIGNATURE};
+ print "</body></html>";
}
}
# Sends the headers waiting in %PLP::Script::header
sub sendheaders () {
+ local $\; # reset print behaviour if triggered by say()
$PLP::sentheaders ||= [ caller 1 ? (caller 1)[1, 2] : (caller)[1, 2] ];
print STDOUT "Content-Type: text/plain\n\n" if $PLP::DEBUG & 2;
while (my ($header, $values) = each %PLP::Script::header) {