summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/http/basic_client.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/http/basic_client.rb b/lib/chef/http/basic_client.rb
index f0f5151dbd..5fb7c20e80 100644
--- a/lib/chef/http/basic_client.rb
+++ b/lib/chef/http/basic_client.rb
@@ -132,8 +132,8 @@ class Chef
Net::HTTP
else
Chef::Log.debug("Using #{http_proxy.host}:#{http_proxy.port} for proxy")
- user = Chef::Config["#{url.scheme}_proxy_user"]
- pass = Chef::Config["#{url.scheme}_proxy_pass"]
+ user = http_proxy.user || Chef::Config["#{url.scheme}_proxy_user"]
+ pass = http_proxy.password || Chef::Config["#{url.scheme}_proxy_pass"]
Net::HTTP.Proxy(http_proxy.host, http_proxy.port, user, pass)
end
end