diff options
author | Salim Alam <salam@chef.io> | 2016-03-17 14:04:53 -0700 |
---|---|---|
committer | Salim Alam <salam@chef.io> | 2016-03-21 21:23:08 -0700 |
commit | 88e05318bc4409b24e9e5ac45403cfde21ad7006 (patch) | |
tree | f72e23329332cee559e3cd1484a7700735bddefc /lib/chef/http | |
parent | b22d5d03a3d26e274f8f33aacea3666681f02116 (diff) | |
download | chef-88e05318bc4409b24e9e5ac45403cfde21ad7006.tar.gz |
Override no_proxy with internal matcher
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/basic_client.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/http/basic_client.rb b/lib/chef/http/basic_client.rb index 190635f798..4253701510 100644 --- a/lib/chef/http/basic_client.rb +++ b/lib/chef/http/basic_client.rb @@ -100,7 +100,12 @@ class Chef end def build_http_client - http_client = http_client_builder.new(host, port) + # Note: the last nil in the new below forces Net::HTTP to ignore the + # no_proxy environment variable. This is a workaround for limitations + # in Net::HTTP use of the no_proxy environment variable. We internally + # match no_proxy with a fuzzy matcher, rather than letting Net::HTTP + # do it. + http_client = http_client_builder.new(host, port, nil) if url.scheme == HTTPS configure_ssl(http_client) |