From 3412d1016a4a166d7e7bf32e56bcde5cc25f19ae Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 28 Nov 2014 07:13:34 +0000 Subject: merge revision(s) 47079: [Backport #10530] * lib/net/http.rb (Net::HTTP.proxy_uri): use initializer instead of parser to handle IPv6 address. [Bug #9129] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@48632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/net/http.rb b/lib/net/http.rb index 973998fdc3..a63be7f9a0 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1024,7 +1024,9 @@ module Net #:nodoc: # The proxy URI determined from the environment for this connection. def proxy_uri # :nodoc: - @proxy_uri ||= URI("http://#{address}:#{port}").find_proxy + @proxy_uri ||= URI::HTTP.new( + "http".freeze, nil, address, port, nil, nil, nil, nil, nil + ).find_proxy end # The address of the proxy server, if one is configured. -- cgit v1.2.3