summaryrefslogtreecommitdiff
path: root/test/net/http
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-28 10:51:37 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-28 10:51:37 +0000
commitc4130b0958f0a8c88011d8fc4aeb54ab1b35f3d5 (patch)
tree09565b9cb2499bfe25cba63db11ba1f421829696 /test/net/http
parentec7c76c446fcb7fafae2fa2f7eda78c2387fac23 (diff)
Net::HTTP.new: Support no_proxy parameter [Feature #11195]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net/http')
-rw-r--r--test/net/http/test_http.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 43f590839f..13c95fc0dc 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -97,6 +97,16 @@ class TestNetHTTP < Test::Unit::TestCase
end
end
+ def test_proxy_address_no_proxy
+ clean_http_proxy_env do
+ http = Net::HTTP.new 'hostname.example', nil, 'proxy.example', nil, nil, nil, 'example'
+ assert_nil http.proxy_address
+
+ http = Net::HTTP.new '10.224.1.1', nil, 'proxy.example', nil, nil, nil, 'example,10.224.0.0/22'
+ assert_nil http.proxy_address
+ end
+ end
+
def test_proxy_from_env_ENV
clean_http_proxy_env do
ENV['http_proxy'] = 'http://proxy.example:8000'