diff options
author | Matthew Draper <matthew@trebex.net> | 2015-07-18 15:07:21 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2015-07-19 02:14:17 +0930 |
commit | 384633c1164bfb0f4ca9a90820577430261dd12d (patch) | |
tree | ad1af5086ea2fae5935ba98185da79bab9f58a35 /test/spec_multipart.rb | |
parent | 7125326d312ca46d6d677412c0f7e92bad29b774 (diff) | |
download | rack-384633c1164bfb0f4ca9a90820577430261dd12d.tar.gz |
Only handle encodings in extended parameter values
Diffstat (limited to 'test/spec_multipart.rb')
-rw-r--r-- | test/spec_multipart.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/spec_multipart.rb b/test/spec_multipart.rb index 6121fdbb..b0ad2cb9 100644 --- a/test/spec_multipart.rb +++ b/test/spec_multipart.rb @@ -279,6 +279,12 @@ describe Rack::Multipart do params["files"][:filename].must_equal "файл" end + it "parse multipart form with a single quote in the filename" do + env = Rack::MockRequest.env_for '/', multipart_fixture(:filename_with_single_quote) + params = Rack::Multipart.parse_multipart(env) + params["files"][:filename].must_equal "bob's flowers.jpg" + end + it "not include file params if no file was selected" do env = Rack::MockRequest.env_for("/", multipart_fixture(:none)) params = Rack::Multipart.parse_multipart(env) |