Browse files

Only requests that require processing from a controller should block …

…the webrick server -- requests for stylesheets, images, and the like should be concurrent

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c4c6af3 commit 12f10f6baf7e38c74db24585d901063cd094867b @dhh dhh committed Dec 16, 2004
Showing with 2 additions and 3 deletions.
  1. +2 −3 railties/lib/webrick_server.rb
View
5 railties/lib/webrick_server.rb
@@ -27,19 +27,18 @@ def initialize(server, options)
def do_GET(req, res)
begin
- REQUEST_MUTEX.lock
-
unless handle_index(req, res)
unless handle_dispatch(req, res)
unless handle_file(req, res)
+ REQUEST_MUTEX.lock
unless handle_mapped(req, res)
raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found."
end
end
end
end
ensure
- REQUEST_MUTEX.unlock
+ REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?
end
end

0 comments on commit 12f10f6

Please sign in to comment.