aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-16 16:08:10 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-16 16:08:10 +0000
commit12f10f6baf7e38c74db24585d901063cd094867b (patch)
tree170219e80aa72e0ea929e41a57941861ba60b320 /railties
parentc4c6af3c2c6face17952e12a8b5b2ce11d81c908 (diff)
downloadrails-12f10f6baf7e38c74db24585d901063cd094867b.tar.gz
rails-12f10f6baf7e38c74db24585d901063cd094867b.tar.bz2
rails-12f10f6baf7e38c74db24585d901063cd094867b.zip
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
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/webrick_server.rb5
1 files changed, 2 insertions, 3 deletions
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