ruby-changes:34997
From: naruse <ko1@a...>
Date: Wed, 6 Aug 2014 04:37:52 +0900 (JST)
Subject: [ruby-changes:34997] naruse:r47079 (trunk): * lib/net/http.rb (Net::HTTP.proxy_uri): use initializer instead
naruse 2014-08-06 04:37:37 +0900 (Wed, 06 Aug 2014) New Revision: 47079 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47079 Log: * lib/net/http.rb (Net::HTTP.proxy_uri): use initializer instead of parser to handle IPv6 address. [Bug #9129] Modified files: trunk/ChangeLog trunk/lib/net/http.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 47078) +++ ChangeLog (revision 47079) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Aug 6 04:33:58 2014 NARUSE, Yui <naruse@r...> + + * 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 <naruse@r...> * lib/net/http/requests.rb (Net::HTTP::Options::RESPONSE_HAS_BODY): Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 47078) +++ lib/net/http.rb (revision 47079) @@ -1026,7 +1026,9 @@ module Net #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L1026 # 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. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/