class ActionDispatch::Request

def content_length

Returns the content length of the request as an integer.
def content_length
  return raw_post.bytesize if headers.key?("Transfer-Encoding")
  super.to_i
end