summaryrefslogtreecommitdiff
path: root/lib/open-uri.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/open-uri.rb')
-rw-r--r--lib/open-uri.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index 86aa0f1887..82339ed473 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -288,7 +288,7 @@ module OpenURI
end
end
- http = klass.new(target_host, target_port)
+ http = proxy ? klass.new(target_host, target_port) : klass.new(target_host, target_port, nil)
if target.class == URI::HTTPS
require 'net/https'
http.use_ssl = true