Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "parse_multipart: Content-Type field doesn't imply a file upload"

This reverts commit acffe8e.

[#79 state:open]
  • Loading branch information...
commit 8e967c1f33ac81ee946dcc65c9f0e6a5fc75d71e 1 parent 7a17739
@jeremy authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rack/utils.rb
View
2  lib/rack/utils.rb
@@ -530,7 +530,7 @@ def self.parse_multipart(env)
content_type = head[/Content-Type: (.*)#{EOL}/ni, 1]
name = head[/Content-Disposition:.*\s+name="?([^\";]*)"?/ni, 1] || head[/Content-ID:\s*([^#{EOL}]*)/ni, 1]
- if filename
+ if content_type || filename
body = Tempfile.new("RackMultipart")
body.binmode if body.respond_to?(:binmode)
end
Please sign in to comment.
Something went wrong with that request. Please try again.