From d010615137911ff66a3e92a947eb4156593540af Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 21 Apr 2018 18:04:11 +0200 Subject: [PATCH] source: delay header output until after errors --- source.plp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source.plp b/source.plp index 269e342..72fdf82 100644 --- a/source.plp +++ b/source.plp @@ -55,7 +55,9 @@ if (not $source) { } else { my $href = showlink($source, $source =~ m{\A (\w+) \.plp \z}x && "/$1"); - say "

Source of $href

"; + PLP_START { + say "

Source of $href

"; + }; if ($source =~ m{(?:/|^)\.}) { Abort("File request not permitted", '403 source not allowed'); -- 2.30.0