This repository was archived by the owner on Dec 3, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 0.1.14 (2015-04-28)
4+
5+ * Ensure Cache-Control is verified
6+
37## 0.1.13 (2015-04-28)
48
59 * Don't cache the Host header
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ require 'date'
66
77Gem ::Specification . new do |s |
88 s . name = 'cache_rules'
9- s . version = '0.1.13 '
9+ s . version = '0.1.14 '
1010
1111 s . date = Date . today . to_s
1212
Original file line number Diff line number Diff line change @@ -90,11 +90,13 @@ def validate_no_cache?(headers)
9090
9191 # source: https://tools.ietf.org/html/rfc7234#section-5.2.2.2
9292 # source: https://tools.ietf.org/html/rfc7234#section-3.2
93- return 1 if ( ( cached = cached_headers [ 'Cache-Control' ] ) ) &&
94- helper_no_cache . call ( cached_headers ) ||
95- ( cached [ 'no-cache' ] && cached [ 'no-cache' ] [ 'quoted_string' ] . nil? ) ||
96- ( cached [ 's-maxage' ] && cached [ 's-maxage' ] [ 'token' ] . to_s == "0" ) ||
97- ( cached [ 'max-age' ] && cached [ 'max-age' ] [ 'token' ] . to_s == "0" )
93+ if cached_headers [ 'Cache-Control' ]
94+ return 1 if ( ( cached = cached_headers [ 'Cache-Control' ] ) ) &&
95+ helper_no_cache . call ( cached_headers ) ||
96+ ( cached [ 'no-cache' ] && cached [ 'no-cache' ] [ 'quoted_string' ] . nil? ) ||
97+ ( cached [ 's-maxage' ] && cached [ 's-maxage' ] [ 'token' ] . to_s == "0" ) ||
98+ ( cached [ 'max-age' ] && cached [ 'max-age' ] [ 'token' ] . to_s == "0" )
99+ end
98100
99101 # source: https://tools.ietf.org/html/rfc7234#section-5.4
100102 # Legacy support for HTTP/1.0 Pragma header
You can’t perform that action at this time.
0 commit comments