From ee9bd59fed7303f9a6d8dc35c1d2a287d325eb22 Mon Sep 17 00:00:00 2001 From: Gisle Aas Date: Wed, 5 Nov 2008 17:08:31 +0100 Subject: [PATCH] More correct matching of 'max-age' in freshness_lifetime method --- lib/HTTP/Response.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/HTTP/Response.pm b/lib/HTTP/Response.pm index 9a89baf..e62ebe1 100644 --- a/lib/HTTP/Response.pm +++ b/lib/HTTP/Response.pm @@ -270,7 +270,7 @@ sub freshness_lifetime for $cc (@cc) { my $cc_dir; for $cc_dir (split(/\s*,\s*/, $cc)) { - if ($cc_dir =~ /max-age\s*=\s*(\d+)/i) { + if ($cc_dir =~ /^max-age\s*=\s*(\d+)/i) { return $1; } } -- 2.11.4.GIT