From f01485b4ec97d6bbc462f6c7210b2499a97ce398 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 5 Aug 2014 19:37:37 +0000 Subject: * 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/trunk@47079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/net/http.rb') diff --git a/lib/net/http.rb b/lib/net/http.rb index eaf2cf4add..aceb530442 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1026,7 +1026,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