content_length()
Returns the content length of the request as an integer.
# File actionpack/lib/action_dispatch/http/request.rb, line 285 def content_length return raw_post.bytesize if headers.key?("Transfer-Encoding") super.to_i end