From b87663fa0d803fa6c07d5ff23d7e344c14a04a84 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 30 Nov 2023 20:07:43 +0100 Subject: [PATCH] expires --- lib/perl/NB/CGI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/perl/NB/CGI.pm b/lib/perl/NB/CGI.pm index 8c1e9f65..6cff3e65 100644 --- a/lib/perl/NB/CGI.pm +++ b/lib/perl/NB/CGI.pm @@ -228,7 +228,7 @@ sub header { my %p = &args2hash(@p); #&argsAdd(\@p,'expires',-1) unless $p{expires}; # Cache-Control: private, no-cache, no-store, must-revalidate, post-check=0, pre-check=0 - if ($p{expires}||0 <0) + if ($p{expires}||0 =~ /^\d+$/ and $p{expires}||0 <=0) { %p = &argsAdd(\@p,'Cache-Control','private, no-cache, no-store, must-revalidate, post-check=0, pre-check=0'); %p = &argsAdd(\@p,'Pragma','no-cache'); -- 2.47.3