diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-16 09:46:00 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-16 09:46:00 +0000 |
| commit | 0fb0096ffd3e07d9da2bb35954d5d6c9a4e27cce (patch) | |
| tree | a922076933dcd0f14a46358c0a7c39a41ed42f89 /lib/webrick/httpserver.rb | |
| parent | 415bd361ca29a2f227a287df758fad27b6e89b26 (diff) | |
| download | ruby-0fb0096ffd3e07d9da2bb35954d5d6c9a4e27cce.tar.gz ruby-0fb0096ffd3e07d9da2bb35954d5d6c9a4e27cce.tar.xz ruby-0fb0096ffd3e07d9da2bb35954d5d6c9a4e27cce.zip | |
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should wait
for reading request till data arrive. [ruby-talk:121068]
* lib/webrick/server.rb (WEBrick::GenericServer#start_thread):
should log about all accepted socket. [ruby-core:03962]
* lib/webrick/accesslog.rb (WEBrick::AccessLog#setup_params):
"%%" and "%u" are supported. [webricken:135]
* lib/webrick/httpservlet/filehandler.rb
(WEBrick::HTTPServlet::FileHandler#check_filename):
:NondisclosureName is acceptable if it is Enumerable.
* lib/webrick/config.rb (WEBrick::Config::FileHandler):
default value of :NondisclosureName is [".ht*", "*~"].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/httpserver.rb')
| -rw-r--r-- | lib/webrick/httpserver.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/webrick/httpserver.rb b/lib/webrick/httpserver.rb index ffbae7040..06d2ea1b6 100644 --- a/lib/webrick/httpserver.rb +++ b/lib/webrick/httpserver.rb @@ -46,6 +46,13 @@ module WEBrick req = HTTPRequest.new(@config) server = self begin + timeout = @config[:RequestTimeout] + while timeout > 0 + break if IO.select([sock], nil, nil, 0.5) + timeout = 0 if @status != :Running + timeout -= 0.5 + end + raise HTTPStatus::EOFError if timeout <= 0 req.parse(sock) res.request_method = req.request_method res.request_uri = req.request_uri |
