From 12f10f6baf7e38c74db24585d901063cd094867b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 16 Dec 2004 16:08:10 +0000 Subject: 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 --- railties/lib/webrick_server.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'railties/lib') diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb index 318d9eb932..e7cf982ff8 100644 --- a/railties/lib/webrick_server.rb +++ b/railties/lib/webrick_server.rb @@ -27,11 +27,10 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet 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 @@ -39,7 +38,7 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet end end ensure - REQUEST_MUTEX.unlock + REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked? end end -- cgit v1.2.3