From: Nicolas Boisselier Date: Thu, 30 Nov 2023 19:07:43 +0000 (+0100) Subject: expires X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=b87663fa0d803fa6c07d5ff23d7e344c14a04a84;p=nb.git expires --- 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');