summaryrefslogtreecommitdiff
path: root/lib/net/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r--lib/net/http.rb4
1 files changed, 3 insertions, 1 deletions
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.