diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-06 17:20:59 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-06 17:20:59 -0300 |
commit | 19d46e849e858b9f9e3be35faec4cd38e04cdae7 (patch) | |
tree | c2e5520ebcbf7ab44a8620bc4a25d81a3cc9527e /actionpack/test/dispatch | |
parent | 8585a10d5eee661f9047d131c225469d8351dbc0 (diff) | |
parent | 9521e18ed0c811e70b2ccef309bdaa1250587aa0 (diff) | |
download | rails-19d46e849e858b9f9e3be35faec4cd38e04cdae7.tar.gz rails-19d46e849e858b9f9e3be35faec4cd38e04cdae7.tar.bz2 rails-19d46e849e858b9f9e3be35faec4cd38e04cdae7.zip |
Merge pull request #21131 from eagletmt/percent-filename
Fix Encoding::UndefinedConversionError with multibyte UTF-8 filename containing "%" character
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/request/multipart_params_parsing_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb index 939a771c65..b36fbd3c76 100644 --- a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb @@ -63,6 +63,17 @@ class MultipartParamsParsingTest < ActionDispatch::IntegrationTest assert_equal 'contents', file.read end + test "parses utf8 filename with percent character" do + params = parse_multipart('utf8_filename') + assert_equal %w(file foo), params.keys.sort + assert_equal 'bar', params['foo'] + + file = params['file'] + assert_equal 'ファイル%名.txt', file.original_filename + assert_equal "text/plain", file.content_type + assert_equal 'contents', file.read + end + test "parses boundary problem file" do params = parse_multipart('boundary_problem_file') assert_equal %w(file foo), params.keys.sort |