Skip to content

Commit e06844f

Browse files
committed
Expect Static to set lowercase values in Vary
1 parent 152b6c9 commit e06844f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

actionpack/test/dispatch/static_test.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_served_gzipped_static_file_with_non_english_filename
7979

8080
assert_gzip "/foo/さようなら.html", response
8181
assert_equal "text/html", response.headers["Content-Type"]
82-
assert_equal "Accept-Encoding", response.headers["Vary"]
82+
assert_equal "accept-encoding", response.headers["Vary"]
8383
assert_equal "gzip", response.headers["Content-Encoding"]
8484
end
8585

@@ -151,7 +151,7 @@ def test_serves_gzip_files_when_header_set
151151
response = get(file_name, "HTTP_ACCEPT_ENCODING" => "gzip")
152152
assert_gzip file_name, response
153153
assert_equal "application/javascript", response.headers["Content-Type"]
154-
assert_equal "Accept-Encoding", response.headers["Vary"]
154+
assert_equal "accept-encoding", response.headers["Vary"]
155155
assert_equal "gzip", response.headers["Content-Encoding"]
156156

157157
response = get(file_name, "HTTP_ACCEPT_ENCODING" => "Gzip")
@@ -170,14 +170,14 @@ def test_serves_gzip_files_when_header_set
170170
def test_set_vary_when_origin_compressed_but_client_cant_accept
171171
file_name = "/gzip/application-a71b3024f80aea3181c09774ca17e712.js"
172172
response = get(file_name, "HTTP_ACCEPT_ENCODING" => "None")
173-
assert_equal "Accept-Encoding", response.headers["Vary"]
173+
assert_equal "accept-encoding", response.headers["Vary"]
174174
end
175175

176176
def test_serves_brotli_files_when_header_set
177177
file_name = "/gzip/application-a71b3024f80aea3181c09774ca17e712.js"
178178
response = get(file_name, "HTTP_ACCEPT_ENCODING" => "br")
179179
assert_equal "application/javascript", response.headers["Content-Type"]
180-
assert_equal "Accept-Encoding", response.headers["Vary"]
180+
assert_equal "accept-encoding", response.headers["Vary"]
181181
assert_equal "br", response.headers["Content-Encoding"]
182182

183183
response = get(file_name, "HTTP_ACCEPT_ENCODING" => "gzip")
@@ -188,7 +188,7 @@ def test_serves_brotli_files_before_gzip_files
188188
file_name = "/gzip/application-a71b3024f80aea3181c09774ca17e712.js"
189189
response = get(file_name, "HTTP_ACCEPT_ENCODING" => "gzip, deflate, sdch, br")
190190
assert_equal "application/javascript", response.headers["Content-Type"]
191-
assert_equal "Accept-Encoding", response.headers["Vary"]
191+
assert_equal "accept-encoding", response.headers["Vary"]
192192
assert_equal "br", response.headers["Content-Encoding"]
193193
end
194194

0 commit comments

Comments
 (0)