Skip to content

Commit 103532a

Browse files
Merge branch 'master' into preserve-headers-option
2 parents 7daa433 + beb20c0 commit 103532a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/net/http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,7 @@ def proxy_from_env?
18061806
def proxy_uri # :nodoc:
18071807
return if @proxy_uri == false
18081808
@proxy_uri ||= URI::HTTP.new(
1809-
"http".freeze, nil, address, port, nil, nil, nil, nil, nil
1809+
"http", nil, address, port, nil, nil, nil, nil, nil
18101810
).find_proxy || false
18111811
@proxy_uri || nil
18121812
end

lib/net/http/generic_request.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(m, reqbody, resbody, uri_or_path, initheader = nil) # :nodoc:
2323
raise ArgumentError, "no host component for URI" unless (hostname && hostname.length > 0)
2424
@uri = uri_or_path.dup
2525
host = @uri.hostname.dup
26-
host << ":".freeze << @uri.port.to_s if @uri.port != @uri.default_port
26+
host << ":" << @uri.port.to_s if @uri.port != @uri.default_port
2727
@path = uri_or_path.request_uri
2828
raise ArgumentError, "no HTTP request path given" unless @path
2929
else
@@ -216,15 +216,15 @@ def update_uri(addr, port, ssl) # :nodoc: internal use only
216216
return unless @uri
217217

218218
if ssl
219-
scheme = 'https'.freeze
219+
scheme = 'https'
220220
klass = URI::HTTPS
221221
else
222-
scheme = 'http'.freeze
222+
scheme = 'http'
223223
klass = URI::HTTP
224224
end
225225

226226
if host = self['host']
227-
host.sub!(/:.*/m, ''.freeze)
227+
host.sub!(/:.*/m, '')
228228
elsif host = @uri.host
229229
else
230230
host = addr

0 commit comments

Comments
 (0)