From 8e8879b1ab5dd8656de131f2407759b5bbf3a4cd Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Thu, 20 Nov 2014 11:36:55 -0500 Subject: [PATCH] merge revision(s): 47079: [Backport #9129] * 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 --- ChangeLog | 5 +++++ lib/net/http.rb | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fe76d3d..9f36195 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 20 16:36:00 2014 NARUSE, Yui + + * lib/net/http.rb (Net::HTTP.proxy_uri): use initializer instead + of parser to handle IPv6 address. [Bug #9129] + Thu Nov 13 22:32:34 2014 CHIKANAGA Tomoyuki * lib/rexml/document.rb: add REXML::Document#document. diff --git a/lib/net/http.rb b/lib/net/http.rb index a1b8d69..954644f 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. -- 2.0.0