Skip Menu |

This queue is for tickets about the LWP-UserAgent-WithCache CPAN distribution.

Report information
The Basics
Id: 16377
Status: resolved
Priority: 0/
Queue: LWP-UserAgent-WithCache

People
Owner: SEKIMURA [...] cpan.org
Requestors: keith [...] sxip.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.03
Fixed in: (no value)



Subject: Responses without "Expires" header are not retrieved from cache
see my patch below. if $obj->{expires} is not defined (I.E. the server didn't return it) the cache doesn't work. expires==0 should mean "never expires". --- WithCache.pm (revision 9476) +++ WithCache.pm (working copy) @@ -36,7 +36,7 @@ if ( defined $obj ) { # XXX: return cached response before "Expires" - if (defined $obj->{expires} and $obj->{expires} > time()) { + unless (defined $obj->{expires} and $obj->{expires} <= time()) { return HTTP::Response->parse($obj->{as_string}); }
fixed in 0.04. thanks for the patch.