Skip to content

Commit

Permalink
Only requests that require processing from a controller should block …
Browse files Browse the repository at this point in the history
…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
dhh committed Dec 16, 2004
1 parent c4c6af3 commit 12f10f6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions railties/lib/webrick_server.rb
Expand Up @@ -27,19 +27,18 @@ def initialize(server, options)


def do_GET(req, res) def do_GET(req, res)
begin begin
REQUEST_MUTEX.lock

unless handle_index(req, res) unless handle_index(req, res)
unless handle_dispatch(req, res) unless handle_dispatch(req, res)
unless handle_file(req, res) unless handle_file(req, res)
REQUEST_MUTEX.lock
unless handle_mapped(req, res) unless handle_mapped(req, res)
raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found." raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found."
end end
end end
end end
end end
ensure ensure
REQUEST_MUTEX.unlock REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?
end end
end end


Expand Down

0 comments on commit 12f10f6

Please sign in to comment.