aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-05-15 22:01:00 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-05-15 22:01:00 +0000
commit6d3dc90c33861d7fa8f12e74f18f3c71ac064b65 (patch)
tree86a82d2c2c682d9808edd6f909823279879652a1
parent32d03af341eba4d0b263156f0241016b857c4d84 (diff)
downloadrails-6d3dc90c33861d7fa8f12e74f18f3c71ac064b65.tar.gz
rails-6d3dc90c33861d7fa8f12e74f18f3c71ac064b65.tar.bz2
rails-6d3dc90c33861d7fa8f12e74f18f3c71ac064b65.zip
Lazy-read request.raw_post from request.body
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-xactionpack/lib/action_controller/request.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb
index 2bc104b772..3ed8c2f08d 100755
--- a/actionpack/lib/action_controller/request.rb
+++ b/actionpack/lib/action_controller/request.rb
@@ -241,7 +241,7 @@ module ActionController
# This is useful for services such as REST, XMLRPC and SOAP
# which communicate over HTTP POST but don't use the traditional parameter format.
def raw_post
- @env['RAW_POST_DATA']
+ @env['RAW_POST_DATA'] ||= body.read
end
# Returns both GET and POST parameters in a single hash.