Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix Expires header logic #1

Merged
merged 1 commit into from over 2 years ago

2 participants

Chris Cherry Masayoshi Sekimura
Chris Cherry

This change better accounts for cases when the Expires header isn't set at all.

Masayoshi Sekimura sekimura merged commit 181bd15 into from October 07, 2011
Masayoshi Sekimura sekimura closed this October 07, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 07, 2011
Chris Cherry Fix Expires header logic 5083a8b
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/LWP/UserAgent/WithCache.pm
2  lib/LWP/UserAgent/WithCache.pm
@@ -48,7 +48,7 @@ sub request {
48 48
 
49 49
      if ( defined $obj ) {
50 50
 
51  
-         unless (defined $obj->{expires} and $obj->{expires} <= time()) {
  51
+         if (defined $obj->{expires} and $obj->{expires} > time()) {
52 52
              return HTTP::Response->parse($obj->{as_string});
53 53
          } 
54 54
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.