aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorFumiaki MATSUSHIMA <mtsmfm@gmail.com>2018-09-09 16:35:48 +0900
committerFumiaki MATSUSHIMA <mtsmfm@gmail.com>2018-09-13 21:38:46 +0900
commit890485cfce4c361c03a41ec23b0ba187007818cc (patch)
tree1bcf2bccc7cdb710511929dbcb4b68dd602df7f3 /actionpack/test/controller
parent823f9e0a89707561b54196bf4aabe20c5edb88c1 (diff)
downloadrails-890485cfce4c361c03a41ec23b0ba187007818cc.tar.gz
rails-890485cfce4c361c03a41ec23b0ba187007818cc.tar.bz2
rails-890485cfce4c361c03a41ec23b0ba187007818cc.zip
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.rb4
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