mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Move request parameter parsing from CGI to AbstractRequest.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -62,20 +62,6 @@ module ActionController
|
||||
parser.result
|
||||
end
|
||||
|
||||
def parse_formatted_request_parameters(mime_type, body)
|
||||
case strategy = ActionController::Base.param_parsers[mime_type]
|
||||
when Proc
|
||||
strategy.call(body)
|
||||
when :xml_simple, :xml_node
|
||||
body.blank? ? {} : Hash.from_xml(body).with_indifferent_access
|
||||
when :yaml
|
||||
YAML.load(body)
|
||||
end
|
||||
rescue Exception => e # YAML, XML or Ruby code block errors
|
||||
{ "exception" => "#{e.message} (#{e.class})", "backtrace" => e.backtrace,
|
||||
"body" => body, "format" => mime_type }
|
||||
end
|
||||
|
||||
private
|
||||
def get_typed_value(value)
|
||||
case value
|
||||
|
||||
Reference in New Issue
Block a user