@@ -168,23 +168,23 @@ def test_no_cache
168168 }
169169 headers2 = {
170170 :request => { } ,
171- :cached => { 'Cache-Control' => { 'no-cache' => { 'quoted_string' => "Cookie" } } }
171+ :cached => { 'Cache-Control' => { 'no-cache' => { 'quoted_string' => "Cookie" } } , "Date" => { "httpdate" => "Thu, 01 Jan 2015 07:03:45 GMT" , "timestamp" => 1420095825 } , "X-Cache-Req-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } , "X-Cache-Res-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } }
172172 }
173173 headers2_nil = {
174174 :request => { } ,
175- :cached => { 'Cache-Control' => { 'no-cache' => { 'quoted_string' => nil } } }
175+ :cached => { 'Cache-Control' => { 'no-cache' => { 'quoted_string' => nil } } , "Date" => { "httpdate" => "Thu, 01 Jan 2015 07:03:45 GMT" , "timestamp" => 1420095825 } , "X-Cache-Req-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } , "X-Cache-Res-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } }
176176 }
177177 headers3 = {
178178 :request => { } ,
179- :cached => { 'Cache-Control' => { 's-maxage' => { 'token' => "0" } } }
179+ :cached => { 'Cache-Control' => { 's-maxage' => { 'token' => "0" } } , "Date" => { "httpdate" => "Thu, 01 Jan 2015 07:03:45 GMT" , "timestamp" => 1420095825 } , "X-Cache-Req-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } , "X-Cache-Res-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } }
180180 }
181181 headers4 = {
182182 :request => { } ,
183- :cached => { 'Cache-Control' => { 'max-age' => { 'token' => 0 } } }
183+ :cached => { 'Cache-Control' => { 'max-age' => { 'token' => 0 } } , "Date" => { "httpdate" => "Thu, 01 Jan 2015 07:03:45 GMT" , "timestamp" => 1420095825 } , "X-Cache-Req-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } , "X-Cache-Res-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } }
184184 }
185185 headers5 = {
186186 :request => { 'Pragma' => { 'no-cache' => { 'token' => nil } } } ,
187- :cached => { 'Cache-Control' => { } }
187+ :cached => { 'Cache-Control' => { } , "Date" => { "httpdate" => "Thu, 01 Jan 2015 07:03:45 GMT" , "timestamp" => 1420095825 } , "X-Cache-Req-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } , "X-Cache-Res-Date" => { "httpdate" => "Sat, 03 Jan 2015 07:03:45 GMT" , "timestamp" => 1420268625 } }
188188 }
189189
190190 guard = CacheRules . validate_no_cache? @no_headers
0 commit comments