diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-28 07:13:34 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-28 07:13:34 +0000 |
commit | 3412d1016a4a166d7e7bf32e56bcde5cc25f19ae (patch) | |
tree | 8144d7220563d805dcc2398c05e9091f22121cea /lib | |
parent | 32ecaac7b18cc5f0b0cee90801819b8e53930870 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/http.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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. |