From aaf78dec43d85058d56dda5518fc757398ccf781 Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Mon, 31 Dec 2007 14:17:41 +0000 Subject: * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service): call do_XXX which corespond with request method. (WEBrick::HTTPProxyServer#do_CONNECT,do_GET,do_POST,do_HEAD): added. * test/webrick/test_httpproxy.rb: add test for WEBrick::HTTPProxyServer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/webrick/utils.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/webrick/utils.rb') diff --git a/test/webrick/utils.rb b/test/webrick/utils.rb index ba03156145..dace41a8f3 100644 --- a/test/webrick/utils.rb +++ b/test/webrick/utils.rb @@ -17,16 +17,20 @@ module TestWEBrick def start_server(klass, config={}, &block) server = klass.new({ :BindAddress => "127.0.0.1", :Port => 0, + :ShutdownSocketWithoutClose =>true, + :ServerType => Thread, :Logger => WEBrick::Log.new(NullWriter), :AccessLog => [[NullWriter, ""]] }.update(config)) begin - thread = Thread.start{ server.start } + server.start addr = server.listeners[0].addr block.yield([server, addr[3], addr[1]]) ensure - server.stop - thread.join + server.shutdown + until server.status == :Stop + sleep 0.1 + end end end -- cgit v1.2.3