diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-07 13:08:53 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-07 13:08:53 +0000 |
commit | dfd6787f4602394dcb7c83fbb1bb8dee0251624d (patch) | |
tree | bf3673b312bb59a57ae9b6a7fc3d1c005fae14de /test/webrick | |
parent | 68fac148f8c158f0024dfbba23bea26d1ee1dd8f (diff) | |
download | ruby-dfd6787f4602394dcb7c83fbb1bb8dee0251624d.tar.gz |
Silence Net::HTTP warning in test.
https://github.com/ruby/webrick/pull/8
Co-authored-by: Espartaco Palma <>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick')
-rw-r--r-- | test/webrick/test_httpproxy.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/webrick/test_httpproxy.rb b/test/webrick/test_httpproxy.rb index b165a924d8..4eef12a47d 100644 --- a/test/webrick/test_httpproxy.rb +++ b/test/webrick/test_httpproxy.rb @@ -64,6 +64,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase req = Net::HTTP::Post.new("/") req.body = "post-data" + req.content_type = "application/x-www-form-urlencoded" http.request(req){|res| assert_equal("1.1 localhost.localdomain:#{port}", res["via"], log.call) assert_equal("POST / post-data", res.body, log.call) @@ -108,6 +109,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase assert_equal(2, request_handler_called, log.call) req = Net::HTTP::Post.new("/") + req.content_type = "application/x-www-form-urlencoded" req.body = "post-data" http.request(req){|res| assert_nil(res["via"], log.call) @@ -336,6 +338,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase req = Net::HTTP::Post.new("/") req.body = "post-data" + req.content_type = "application/x-www-form-urlencoded" http.request(req){|res| via = res["via"].split(/,\s+/) assert(via.include?("1.1 localhost.localdomain:#{up_port}"), up_log.call + log.call) @@ -380,6 +383,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase req2 = Net::HTTP::Post.new("/") req2.body = "post-data" + req2.content_type = "application/x-www-form-urlencoded" http.request(req2){|res| assert_equal("SSL POST / post-data", res.body, up_log.call + log.call + s_log.call) } |