diff options
author | Paul Nikitochkin <paul.nikitochkin@gmail.com> | 2013-07-08 00:11:57 +0300 |
---|---|---|
committer | Paul Nikitochkin <paul.nikitochkin@gmail.com> | 2013-07-08 00:11:57 +0300 |
commit | c61b3ce0f5f4203821838c9b1ca00c851192f22b (patch) | |
tree | dec79bef78fc10e7a6a3172f678049704669a1f3 /actionpack | |
parent | b18a27375a62b7c9848cd2dc7b5cf152ef61b62f (diff) | |
download | rails-c61b3ce0f5f4203821838c9b1ca00c851192f22b.tar.gz rails-c61b3ce0f5f4203821838c9b1ca00c851192f22b.tar.bz2 rails-c61b3ce0f5f4203821838c9b1ca00c851192f22b.zip |
Use helper method to get ENV['CONTENT_LENGTH']
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 4ca1d35489..b4cf8ad2f7 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -226,7 +226,7 @@ module ActionDispatch def raw_post unless @env.include? 'RAW_POST_DATA' raw_post_body = body - @env['RAW_POST_DATA'] = raw_post_body.read(@env['CONTENT_LENGTH'].to_i) + @env['RAW_POST_DATA'] = raw_post_body.read(content_length) raw_post_body.rewind if raw_post_body.respond_to?(:rewind) end @env['RAW_POST_DATA'] |