1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Rolled out last change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ryan 2009-11-16 03:57:14 +00:00
parent ad3fa7afd1
commit ffe69c2d6a

View file

@ -971,7 +971,7 @@ class CGI
end
def read_multipart(boundary, content_length)
params = Hash.new { |h,k| h[k] = [] }
params = Hash.new([])
boundary = "--" + boundary
quoted_boundary = Regexp.quote(boundary, "n")
buf = ""
@ -1063,8 +1063,11 @@ class CGI
/Content-Disposition:.* name="?([^\";\s]*)"?/ni.match(head)
name = $1.dup
params[name].push(body)
if params.has_key?(name)
params[name].push(body)
else
params[name] = [body]
end
break if buf.size == 0
break if content_length == -1
end