diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-23 05:43:00 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-23 05:43:00 +0000 |
commit | b0d01921d8fe5d54d90c9bf4aa77ba819ab52a97 (patch) | |
tree | b428af7b730039f629d94d76864dab1ad5daa526 /actionpack/lib | |
parent | d418b7d39139bb881c37f0f095788ec034b98965 (diff) | |
download | rails-b0d01921d8fe5d54d90c9bf4aa77ba819ab52a97.tar.gz rails-b0d01921d8fe5d54d90c9bf4aa77ba819ab52a97.tar.bz2 rails-b0d01921d8fe5d54d90c9bf4aa77ba819ab52a97.zip |
Rewind request body after reading it, if possible. Closes #8438.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6815 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/request.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index 0dfc4a91d0..476f65a6dc 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -330,7 +330,9 @@ module ActionController # Only multipart form parsing expects a stream. if strategy && strategy != :multipart_form - body = body.read(content_length) + data = body.read(content_length) + body.rewind if body.respond_to?(:rewind) + body = data end case strategy |