diff options
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 2 | ||||
-rw-r--r-- | actionpack/test/dispatch/static_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index 41c220236a..3eab3795a0 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -65,7 +65,7 @@ module ActionDispatch status, headers, body = @file_server.call(request.env) end - headers['Vary'] = 'Accept-Encoding' if gzip_path + headers['Vary'] = 'Accept-Encoding' return [status, headers, body] ensure 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 = {}) |