Skip to content

Commit acffe8e

Browse files
parse_multipart: Content-Type field doesn't imply a file upload
Fixes issues created by 6674f36. [#79 state:resolved]
1 parent a6320b9 commit acffe8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rack/utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def self.parse_multipart(env)
503503
content_type = head[/Content-Type: (.*)#{EOL}/ni, 1]
504504
name = head[/Content-Disposition:.*\s+name="?([^\";]*)"?/ni, 1] || head[/Content-ID:\s*([^#{EOL}]*)/ni, 1]
505505

506-
if content_type || filename
506+
if filename
507507
body = Tempfile.new("RackMultipart")
508508
body.binmode if body.respond_to?(:binmode)
509509
end

0 commit comments

Comments
 (0)