class ActionDispatch::Request

def content_length

Returns the content length of the request as an integer.
def content_length
  return raw_post.bytesize if has_header?(TRANSFER_ENCODING)
  super.to_i
end