Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/net/http/header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -964,13 +964,13 @@ def set_form_data(params, sep = '&')
# Field names and values of non-file fields should be encoded with this charset.
#
def set_form(params, enctype='application/x-www-form-urlencoded', formopt={})
@body_data = params
@body = nil
@body_stream = nil
@form_option = formopt
case enctype
when /\Aapplication\/x-www-form-urlencoded\z/i,
/\Amultipart\/form-data\z/i
@body_data = params
@body = nil
@body_stream = nil
@form_option = formopt
self.content_type = enctype
else
raise ArgumentError, "invalid enctype: #{enctype}"
Expand Down