summaryrefslogtreecommitdiff
path: root/lib/net/http/generic_request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/http/generic_request.rb')
-rw-r--r--lib/net/http/generic_request.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/net/http/generic_request.rb b/lib/net/http/generic_request.rb
index bcf87d3..f10ddeb 100644
--- a/lib/net/http/generic_request.rb
+++ b/lib/net/http/generic_request.rb
@@ -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"
+ buf << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{filename}\"\r\nContent-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)