common: fix double html headers on plp errors
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 29 Aug 2020 16:29:22 +0000 (18:29 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 20 Oct 2020 20:49:11 +0000 (22:49 +0200)
The exception added in commit v1.9-254-g560ad76852 (2017-05-29)
[common: html page headers on plp errors] seems unneeded (now?);
maybe for different server/version/environment setup?

common.inc.plp

index d0e1c328ec862f2221443b2517804927f7592a84..b8dac37ed30c9f043b50b9c6e5fa6fabaed83d82 100644 (file)
@@ -198,7 +198,7 @@ BEGIN {
        $PLP::ERROR = sub {
                my ($text, $html) = @_;
                warn $text;
-               unless ($PLP::sentheaders and $PLP::sentheaders->[0] !~ m{/PLP\.pm$}) {
+               unless ($PLP::sentheaders) {
                        Html({nocache => 1});
                        say '<h1>Page unavailable</h1>';
                }