Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 3454

Show
Ignore:
Timestamp:
01/21/06 23:38:41 (3 years ago)
Author:
david
Message:

Fixed that static requests could unlock the mutex guarding dynamic requests in the WEBrick servlet (closes #3433) [tom@craz8.com]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/lib/webrick_server.rb

    r2987 r3454  
    7878 
    7979  def service(req, res) #:nodoc: 
    80     begin 
    81       unless handle_file(req, res) 
     80    unless handle_file(req, res) 
     81      begin 
    8282        REQUEST_MUTEX.lock unless ActionController::Base.allow_concurrency 
    8383        unless handle_dispatch(req, res) 
    8484          raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found." 
    8585        end 
    86       end 
    87     ensure 
    88       unless ActionController::Base.allow_concurrency 
    89         REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked? 
     86      ensure 
     87        unless ActionController::Base.allow_concurrency 
     88          REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked? 
     89        end 
    9090      end 
    9191    end