diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-12 00:37:12 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-12 00:37:12 +0000 |
commit | 6bcf7098384e96bc756356ee08bc0dd92584244f (patch) | |
tree | b0aebcf6b4282e866b0641d4e769760724c1a713 /test/webrick/test_httpproxy.rb | |
parent | 23733f1014b4f3e8445a2f5606085a554e026668 (diff) | |
download | ruby-6bcf7098384e96bc756356ee08bc0dd92584244f.tar.gz |
* test/webrick/test_cgi.rb: Removes usage of deprecated
:RequestHandler option.
patched by Peter Weldon [ruby-core:34010]
* test/webrick/test_httpproxy.rb: ditto.
* test/webrick/test_httpserver.rb: Add a test of the deprecation
behaviour.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick/test_httpproxy.rb')
-rw-r--r-- | test/webrick/test_httpproxy.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/webrick/test_httpproxy.rb b/test/webrick/test_httpproxy.rb index 58b834fe36..cab7095d12 100644 --- a/test/webrick/test_httpproxy.rb +++ b/test/webrick/test_httpproxy.rb @@ -33,7 +33,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase config = { :ServerName => "localhost.localdomain", :ProxyContentHandler => Proc.new{|req, res| proxy_handler_called += 1 }, - :RequestHandler => Proc.new{|req, res| request_handler_called += 1 } + :RequestCallback => Proc.new{|req, res| request_handler_called += 1 } } TestWEBrick.start_httpproxy(config){|server, addr, port, log| server.mount_proc("/"){|req, res| @@ -78,7 +78,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase config = { :ServerName => "localhost.localdomain", :ProxyContentHandler => Proc.new{|req, res| proxy_handler_called += 1 }, - :RequestHandler => Proc.new{|req, res| request_handler_called += 1 } + :RequestCallback => Proc.new{|req, res| request_handler_called += 1 } } TestWEBrick.start_httpproxy(config){|server, addr, port, log| server.mount_proc("/"){|req, res| @@ -143,7 +143,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase } config = { :ServerName => "localhost.localdomain", - :RequestHandler => Proc.new{|req, res| + :RequestCallback => Proc.new{|req, res| assert_equal("CONNECT", req.request_method) }, } @@ -185,7 +185,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase up_config = { :ServerName => "localhost.localdomain", :ProxyContentHandler => Proc.new{|req, res| up_proxy_handler_called += 1}, - :RequestHandler => Proc.new{|req, res| up_request_handler_called += 1} + :RequestCallback => Proc.new{|req, res| up_request_handler_called += 1} } TestWEBrick.start_httpproxy(up_config){|up_server, up_addr, up_port, up_log| up_server.mount_proc("/"){|req, res| @@ -195,7 +195,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase :ServerName => "localhost.localdomain", :ProxyURI => URI.parse("http://localhost:#{up_port}"), :ProxyContentHandler => Proc.new{|req, res| proxy_handler_called += 1}, - :RequestHandler => Proc.new{|req, res| request_handler_called += 1}, + :RequestCallback => Proc.new{|req, res| request_handler_called += 1}, } TestWEBrick.start_httpproxy(config){|server, addr, port, log| http = Net::HTTP.new(up_addr, up_port, addr, port) |