From: Mischa POSLAWSKY Date: Mon, 30 Oct 2023 19:11:14 +0000 (+0100) Subject: common: avoid contents on HEAD method for all pages X-Git-Tag: v1.15~26 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/50763dcb98df403ba90a936d1f120a6b61eba995 common: avoid contents on HEAD method for all pages Support fast if-modified lookup everywhere why not. --- diff --git a/common.inc.plp b/common.inc.plp index 6ea1197..f127505 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -142,6 +142,7 @@ sub Html { # document headers before output $header{content_type} = "text/html; charset=$meta->{charset}" unless $PLP::sentheaders; + exit if $ENV{REQUEST_METHOD} eq 'HEAD'; unshift @{ $meta->{raw} }, stylesheet($meta->{stylesheet}); push @{ $meta->{raw} }, ( diff --git a/index.plp b/index.plp index 8d48cf7..3296207 100644 --- a/index.plp +++ b/index.plp @@ -17,8 +17,6 @@ Html({ ], data => ['UPDATE'], }); - -exit if $ENV{REQUEST_METHOD} eq 'HEAD'; :>

Shiar's cheat sheets