summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-05 19:37:37 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-05 19:37:37 +0000
commitf01485b4ec97d6bbc462f6c7210b2499a97ce398 (patch)
tree9ba1b2fe5c4ddec0dd0a86acecc5e32143138728
parent90a16cb228bd803368357cf4478430bc56b7a110 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/http.rb4
2 files changed, 8 insertions, 1 deletions
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 <naruse@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* 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.