This repository was archived by the owner on Dec 3, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## 0.1.14 (2015-04-28)
4
+
5
+ * Ensure Cache-Control is verified
6
+
3
7
## 0.1.13 (2015-04-28)
4
8
5
9
* Don't cache the Host header
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ require 'date'
6
6
7
7
Gem ::Specification . new do |s |
8
8
s . name = 'cache_rules'
9
- s . version = '0.1.13 '
9
+ s . version = '0.1.14 '
10
10
11
11
s . date = Date . today . to_s
12
12
Original file line number Diff line number Diff line change @@ -90,11 +90,13 @@ def validate_no_cache?(headers)
90
90
91
91
# source: https://tools.ietf.org/html/rfc7234#section-5.2.2.2
92
92
# 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
98
100
99
101
# source: https://tools.ietf.org/html/rfc7234#section-5.4
100
102
# Legacy support for HTTP/1.0 Pragma header
You can’t perform that action at this time.
0 commit comments