diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-09-23 19:43:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-23 19:43:06 +0200 |
commit | ed56a031041a868eeeb439d8b79d04565be1286f (patch) | |
tree | ce6a75a8a34c92f2291a2188845ce2084e069b89 /actionpack/test/controller | |
parent | 22dc2b3db894cb709c132456d787166839455a8e (diff) | |
parent | 890485cfce4c361c03a41ec23b0ba187007818cc (diff) | |
download | rails-ed56a031041a868eeeb439d8b79d04565be1286f.tar.gz rails-ed56a031041a868eeeb439d8b79d04565be1286f.tar.bz2 rails-ed56a031041a868eeeb439d8b79d04565be1286f.zip |
Merge pull request #33829 from mtsmfm/encode-filename
Encode Content-Disposition filenames on send_data and send_file
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index 7b1a52b277..c917cdf761 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -144,7 +144,7 @@ class SendFileTest < ActionController::TestCase get :test_send_file_headers_bang assert_equal "image/png", response.content_type - assert_equal 'disposition; filename="filename"', response.get_header("Content-Disposition") + assert_equal %(disposition; filename="filename"; filename*=UTF-8''filename), response.get_header("Content-Disposition") assert_equal "binary", response.get_header("Content-Transfer-Encoding") assert_equal "private", response.get_header("Cache-Control") end @@ -153,7 +153,7 @@ class SendFileTest < ActionController::TestCase def test_send_file_headers_with_disposition_as_a_symbol get :test_send_file_headers_with_disposition_as_a_symbol - assert_equal 'disposition; filename="filename"', response.get_header("Content-Disposition") + assert_equal %(disposition; filename="filename"; filename*=UTF-8''filename), response.get_header("Content-Disposition") end def test_send_file_headers_with_mime_lookup_with_symbol |