From 50763dcb98df403ba90a936d1f120a6b61eba995 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 30 Oct 2023 20:11:14 +0100 Subject: [PATCH] common: avoid contents on HEAD method for all pages Support fast if-modified lookup everywhere why not. --- common.inc.plp | 1 + index.plp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) 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

-- 2.30.0