Subject: | setting cooking expiry to 3600s fails |
Hi Lincoln,
v3.25 introduced a one character change in CGI::Util that breaks cookies
that explicitly set the 's' for the number of seconds in the expiry
offset. The regexp only accepts [mhdMy] as valid expiry modifiers, even
though the docs (and all older version) also accepted 's'.
The attached (trivial) patch fixes the problem by adding the 's' into
the regexp.
Cheers,
Cees Hek
Subject: | CGI_Util_expiry_fix.patch |
--- CGI/Util.pm.3.25 2006-09-28 14:35:27.000000000 -0400
+++ CGI/Util.pm 2006-12-20 15:30:47.000000000 -0500
@@ -261,7 +261,7 @@
$offset = 0;
} elsif ($time=~/^\d+/) {
return $time;
- } elsif ($time=~/^([+-]?(?:\d+|\d*\.\d*))([mhdMy])/) {
+ } elsif ($time=~/^([+-]?(?:\d+|\d*\.\d*))([smhdMy])/) {
$offset = ($mult{$2} || 1)*$1;
} else {
return $time;