]> git.nbdom.net Git - nb.git/commitdiff
expires
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 30 Nov 2023 19:07:43 +0000 (20:07 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 30 Nov 2023 19:07:43 +0000 (20:07 +0100)
lib/perl/NB/CGI.pm

index 8c1e9f6577d7ef40f7f3e5d4b123e4da86532767..6cff3e652ff96ae3711a7f162217226cf3e2392a 100644 (file)
@@ -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');