From 067c52f608568e35181830a5c1016e382650e655 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Tue, 19 Jan 2016 22:00:42 +0530 Subject: Its ideal to set Vary: Accept-Encoding, irrespective of whether gzipped version exists or not. This is helpful for CDN's to later distinguish assets, based on previous, current copies and introduced gzip version if any. For ref: https://www.fastly.com/blog/best-practices-for-using-the-vary-header This change sets `Vary` header always, to be on safer side --- actionpack/test/dispatch/static_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb index ea8b5e904e..24994c8adb 100644 --- a/actionpack/test/dispatch/static_test.rb +++ b/actionpack/test/dispatch/static_test.rb @@ -233,7 +233,7 @@ module StaticTests def assert_html(body, response) assert_equal body, response.body assert_equal "text/html", response.headers["Content-Type"] - assert_nil response.headers["Vary"] + assert_not_nil response.headers["Vary"] end def get(path, headers = {}) -- cgit v1.2.3