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 --- ChangeLog | 5 +++++ lib/net/http.rb | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ad2fced1d7..ad4664e984 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 6 04:33:58 2014 NARUSE, Yui + + * lib/net/http.rb (Net::HTTP.proxy_uri): use initializer instead + of parser to handle IPv6 address. [Bug #9129] + Wed Aug 6 04:16:05 2014 NARUSE, Yui * lib/net/http/requests.rb (Net::HTTP::Options::RESPONSE_HAS_BODY): 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