cache_rules 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/cache_rules.gemspec +1 -1
- data/lib/formatting.rb +1 -1
- metadata +1 -1
data/CHANGELOG.md
CHANGED
data/cache_rules.gemspec
CHANGED
data/lib/formatting.rb
CHANGED
@@ -104,7 +104,7 @@ module CacheRules
|
|
104
104
|
def httpdate_helper(header)
|
105
105
|
# source: https://tools.ietf.org/html/rfc7231#section-7.1.1.1
|
106
106
|
DateTime.parse(header).to_time.to_i
|
107
|
-
rescue
|
107
|
+
rescue => e
|
108
108
|
# If the supplied date is invalid, use a time in the past (5 minutes ago)
|
109
109
|
# source: https://tools.ietf.org/html/rfc7234#section-5.3
|
110
110
|
Time.now.gmtime.to_i - 300
|