Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/net/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ def connect
write_timeout: @write_timeout,
continue_timeout: @continue_timeout,
debug_output: @debug_output)
buf = "CONNECT #{conn_address}:#{@port} HTTP/#{HTTPVersion}\r\n"
buf = +"CONNECT #{conn_address}:#{@port} HTTP/#{HTTPVersion}\r\n"
buf << "Host: #{@address}:#{@port}\r\n"
if proxy_user
credential = ["#{proxy_user}:#{proxy_pass}"].pack('m0')
Expand Down
4 changes: 2 additions & 2 deletions lib/net/http/generic_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def encode_multipart_form_data(out, params, opt)
boundary ||= SecureRandom.urlsafe_base64(40)
chunked_p = chunked?

buf = String.new
buf = +''
params.each do |key, value, h={}|
key = quote_string(key, charset)
filename =
Expand Down Expand Up @@ -401,7 +401,7 @@ def write_header(sock, ver, path)
if /[\r\n]/ =~ reqline
raise ArgumentError, "A Request-Line must not contain CR or LF"
end
buf = String.new
buf = +''
buf << reqline << "\r\n"
each_capitalized do |k,v|
buf << "#{k}: #{v}\r\n"
Expand Down
2 changes: 1 addition & 1 deletion lib/net/http/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def procdest(dest, block)
if block
Net::ReadAdapter.new(block)
else
dest || String.new
dest || +''
end
end

Expand Down