diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-20 18:32:04 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-20 18:32:04 +0000 |
commit | 24b13acd428d50c077d913d6f308842377eddf62 (patch) | |
tree | 2c64084ca6673399cf50678d02e03a98fa53c3ce /actionpack/lib/action_controller/request.rb | |
parent | 8cc64e77cf0e7b25fbcb9f19c2c640410a62cb89 (diff) | |
download | rails-24b13acd428d50c077d913d6f308842377eddf62.tar.gz rails-24b13acd428d50c077d913d6f308842377eddf62.tar.bz2 rails-24b13acd428d50c077d913d6f308842377eddf62.zip |
Made the post_format work with content-type
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/request.rb')
-rwxr-xr-x | actionpack/lib/action_controller/request.rb | 10 |
1 files changed, 8 insertions, 2 deletions
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 |