diff options
Diffstat (limited to 'lib/webrick/httpserver.rb')
| -rw-r--r-- | lib/webrick/httpserver.rb | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/webrick/httpserver.rb b/lib/webrick/httpserver.rb index 0618489c53..ddf1ac7404 100644 --- a/lib/webrick/httpserver.rb +++ b/lib/webrick/httpserver.rb @@ -73,10 +73,10 @@ module WEBrick timeout = @config[:RequestTimeout] while timeout > 0 break if IO.select([sock], nil, nil, 0.5) - break if @status != :Running + timeout = 0 if @status != :Running timeout -= 0.5 end - raise HTTPStatus::EOFError if timeout <= 0 || @status != :Running + raise HTTPStatus::EOFError if timeout <= 0 raise HTTPStatus::EOFError if sock.eof? req.parse(sock) res.request_method = req.request_method @@ -138,10 +138,6 @@ module WEBrick si.service(req, res) end - ## - # The default OPTIONS request handler says GET, HEAD, POST and OPTIONS - # requests are allowed. - def do_OPTIONS(req, res) res["allow"] = "GET,HEAD,POST,OPTIONS" end @@ -211,10 +207,6 @@ module WEBrick } end - ## - # Logs +req+ and +res+ in the access logs. +config+ is used for the - # server name. - def access_log(config, req, res) param = AccessLog::setup_params(config, req, res) @config[:AccessLog].each{|logger, fmt| @@ -222,13 +214,7 @@ module WEBrick } end - ## - # Mount table for the path a servlet is mounted on in the directory space - # of the server. Users of WEBrick can only access this indirectly via - # WEBrick::HTTPServer#mount, WEBrick::HTTPServer#unmount and - # WEBrick::HTTPServer#search_servlet - - class MountTable # :nodoc: + class MountTable def initialize @tab = Hash.new compile |
