request_interceptor icon indicating copy to clipboard operation
request_interceptor copied to clipboard

Body is set twice

Open t6d opened this issue 10 years ago • 0 comments

Ensure that when constructing a request the body is not set twice.

# File lib/net/http.rb, line 1908
def set_body_internal(str)   #:nodoc: internal use only
  raise ArgumentError, "both of body argument and HTTPRequest#body set" if str and (@body or @body_stream)
  self.body = str if str
end

t6d avatar Dec 22 '15 21:12 t6d