From 24b13acd428d50c077d913d6f308842377eddf62 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 20 May 2005 18:32:04 +0000 Subject: Made the post_format work with content-type git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/request.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller/request.rb') diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index 02682b57cf..214edf250e 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -3,7 +3,6 @@ module ActionController class AbstractRequest # Returns both GET and POST parameters in a single hash. def parameters - # puts "#{request_parameters.inspect} | #{query_parameters.inspect} | #{path_parameters.inspect}" @parameters ||= request_parameters.merge(query_parameters).merge(path_parameters).with_indifferent_access end @@ -36,7 +35,14 @@ module ActionController if env['HTTP_X_POST_DATA_FORMAT'] env['HTTP_X_POST_DATA_FORMAT'].downcase.intern else - :query_string + case env['HTTP_CONTENT_TYPE'] + when 'application/xml', 'text/xml' + :xml + when 'application/x-yaml', 'text/x-yaml' + :yaml + else + :url_encoded + end end end -- cgit v1.2.3