diff options
-rw-r--r-- | lib/net/http/generic_request.rb | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -186,9 +186,7 @@ class Net::HTTPGenericRequest if filename filename = quote_string(filename, charset) type = h[:content_type] || 'application/octet-stream' - buf << "Content-Disposition: form-data; " \ - "name=\"#{key}\"; filename=\"#{filename}\"\r\n" \ - "Content-Type: #{type}\r\n\r\n" if !out.respond_to?(:write) || !value.respond_to?(:read) # if +out+ is not an IO or +value+ is not an IO buf << (value.respond_to?(:read) ? value.read : value) |