diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2016-01-20 14:27:52 -0800 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2016-01-20 14:27:52 -0800 |
commit | 24e39ffb53bc3daa47a0aee8c37734d8ae39b824 (patch) | |
tree | 64c735bee3ede51ab398d673a78ae66177c69027 /actionpack/test/dispatch | |
parent | 3bc6a6c123985eae2c902eb66bf396ed6f5fb27c (diff) | |
parent | e362c31b342927361f3e81f36d12e245bca624c2 (diff) | |
download | rails-24e39ffb53bc3daa47a0aee8c37734d8ae39b824.tar.gz rails-24e39ffb53bc3daa47a0aee8c37734d8ae39b824.tar.bz2 rails-24e39ffb53bc3daa47a0aee8c37734d8ae39b824.zip |
Merge pull request #17573 from zerothabhishek/master
Response etags to always be weak: Prefixed 'W/' to value returned by Act...
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/response_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb index 43ee2efd9f..8b3849cb7a 100644 --- a/actionpack/test/dispatch/response_test.rb +++ b/actionpack/test/dispatch/response_test.rb @@ -197,11 +197,11 @@ class ResponseTest < ActiveSupport::TestCase } resp.to_a - assert_equal('"202cb962ac59075b964b07152d234b70"', resp.etag) + assert_equal('W/"202cb962ac59075b964b07152d234b70"', resp.etag) assert_equal({:public => true}, resp.cache_control) assert_equal('public', resp.headers['Cache-Control']) - assert_equal('"202cb962ac59075b964b07152d234b70"', resp.headers['ETag']) + assert_equal('W/"202cb962ac59075b964b07152d234b70"', resp.headers['ETag']) end test "read charset and content type" do @@ -388,16 +388,16 @@ class ResponseIntegrationTest < ActionDispatch::IntegrationTest assert_response :success assert_equal('public', @response.headers['Cache-Control']) - assert_equal('"202cb962ac59075b964b07152d234b70"', @response.headers['ETag']) + assert_equal('W/"202cb962ac59075b964b07152d234b70"', @response.headers['ETag']) - assert_equal('"202cb962ac59075b964b07152d234b70"', @response.etag) + assert_equal('W/"202cb962ac59075b964b07152d234b70"', @response.etag) assert_equal({:public => true}, @response.cache_control) end test "response cache control from rackish app" do @app = lambda { |env| [200, - {'ETag' => '"202cb962ac59075b964b07152d234b70"', + {'ETag' => 'W/"202cb962ac59075b964b07152d234b70"', 'Cache-Control' => 'public'}, ['Hello']] } @@ -405,9 +405,9 @@ class ResponseIntegrationTest < ActionDispatch::IntegrationTest assert_response :success assert_equal('public', @response.headers['Cache-Control']) - assert_equal('"202cb962ac59075b964b07152d234b70"', @response.headers['ETag']) + assert_equal('W/"202cb962ac59075b964b07152d234b70"', @response.headers['ETag']) - assert_equal('"202cb962ac59075b964b07152d234b70"', @response.etag) + assert_equal('W/"202cb962ac59075b964b07152d234b70"', @response.etag) assert_equal({:public => true}, @response.cache_control) end |