diff options
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 |