From 9a012539baf79006b2c6b25b4eaf8d2cdd40e123 Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Thu, 18 May 2006 13:42:52 +0000 Subject: * lib/webrick/config.rb (WEBrick::Config::HTTP): add new parameters, :InputBufferSize and :OutputBufferSize. * lib/webrick/utils.rb (WEBrick::Utils.timeout): add new timeout method. this implementation is expected to be compatible with timeout.rb and faster than timeout.rb. * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#_read_data): Timeout.timeout is replaced by WEBrick::Utils.timeout. * lib/webrick/httprequest.rb: WEBrick::HTTPRequest::BUFSIZE is replaced by config[:InputBufferSize]. * lib/webrick/httpresposne.rb: WEBrick::HTTPResponse::BUFSIZE is replaced by config[:OutputBufferSize]. * lib/webrick/server.rb: get rid of unnecessary require. * test/webrick/test_utils.rb: test for WEBrick::Utils.timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/webrick/config.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/webrick/config.rb') diff --git a/lib/webrick/config.rb b/lib/webrick/config.rb index 19d0c7ab14..10db6e0944 100644 --- a/lib/webrick/config.rb +++ b/lib/webrick/config.rb @@ -48,6 +48,8 @@ module WEBrick :DocumentRootOptions => { :FancyIndexing => true }, :RequestCallback => nil, :ServerAlias => nil, + :InputBufferSize => 65536, # input buffer size in reading request body + :OutputBufferSize => 65536, # output buffer size in sending File or IO # for HTTPProxyServer :ProxyAuthProc => nil, -- cgit v1.2.3