diff options
author | fatkodima <fatkodima123@gmail.com> | 2019-11-29 16:57:03 +0200 |
---|---|---|
committer | fatkodima <fatkodima123@gmail.com> | 2019-11-29 16:57:03 +0200 |
commit | 2a8aa75fae1856713ccb9cdff20dd758f488d0e0 (patch) | |
tree | 7fc1278e3d534cc1eeca4bcf04687c9993d0259f /test/spec_multipart.rb | |
parent | 93dfcdf46084760079514c858ae7391e90a7821e (diff) | |
download | rack-2a8aa75fae1856713ccb9cdff20dd758f488d0e0.tar.gz |
Robust separation of Content-Disposition fields
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 b029048e..2d51f091 100644 --- a/test/spec_multipart.rb +++ b/test/spec_multipart.rb @@ -306,6 +306,12 @@ describe Rack::Multipart do params["files"][:filename].must_equal "flowers.exe\u0000.jpg" end + it "is robust separating Content-Disposition fields" do + env = Rack::MockRequest.env_for("/", multipart_fixture(:robust_field_separation)) + params = Rack::Multipart.parse_multipart(env) + params["text"].must_equal "contents" + 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) |