method
parse_form_data
parse_form_data(io, boundary)
public
Hide source
# File lib/webrick/httputils.rb, line 306 def parse_form_data(io, boundary) boundary_regexp = /\A--#{boundary}(--)?#{CRLF}\z/ form_data = Hash.new return form_data unless io data = nil io.each{|line| if boundary_regexp =~ line if data data.chop! key = data.name if form_data.has_key?(key) form_data[key].append_data(data) else form_data[key] = data end end data = FormData.new next else if data data << line end end } return form_data end