diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-01-19 22:51:41 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-01-19 22:56:38 -0600 |
commit | 5ebfa6242726bd186452640ed5704f2adc1a5007 (patch) | |
tree | f92aa23442f86c9d4b875192ae9712d5cffd1214 /actionpack/lib/action_dispatch | |
parent | a5d06d05fbdc0b66d8ba64a7982288a54b31865b (diff) | |
download | rails-5ebfa6242726bd186452640ed5704f2adc1a5007.tar.gz rails-5ebfa6242726bd186452640ed5704f2adc1a5007.tar.bz2 rails-5ebfa6242726bd186452640ed5704f2adc1a5007.zip |
Revert streaming params parser support.
AS Xml and Json parsers expect the request body to be a real IO object
supporting methods like getc or ungetc which are not specified by the
Rack spec and aren't supported by Passenger or the Rewindable input
wrapper.
We can restore functionality if the AS parsers are rewritten to support
Racks subset of supported IO methods.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/params_parser.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/params_parser.rb b/actionpack/lib/action_dispatch/middleware/params_parser.rb index 534390d4aa..522982e202 100644 --- a/actionpack/lib/action_dispatch/middleware/params_parser.rb +++ b/actionpack/lib/action_dispatch/middleware/params_parser.rb @@ -35,14 +35,14 @@ module ActionDispatch when Proc strategy.call(request.raw_post) when :xml_simple, :xml_node - request.body.size == 0 ? {} : Hash.from_xml(request.body).with_indifferent_access + request.body.size == 0 ? {} : Hash.from_xml(request.raw_post).with_indifferent_access when :yaml - YAML.load(request.body) + YAML.load(request.raw_post) when :json if request.body.size == 0 {} else - data = ActiveSupport::JSON.decode(request.body) + data = ActiveSupport::JSON.decode(request.raw_post) data = {:_json => data} unless data.is_a?(Hash) data.with_indifferent_access end |