Permalink
Browse files

Final blow to CGI

  • Loading branch information...
1 parent cf44788 commit d7751036fa0af56b31a1d1350284fa86c0f93971 @josh josh committed with wycats Apr 14, 2009
Showing with 3 additions and 14 deletions.
  1. +3 −14 actionpack/lib/action_controller/dispatch/dispatcher.rb
@@ -66,27 +66,16 @@ def cleanup_application
define_callbacks :prepare_dispatch, :before_dispatch, :after_dispatch
def initialize
- @app = @@middleware.build(lambda { |env| self._call(env) })
- freeze
+ @app = @@middleware.build(lambda { |env| self.dup._call(env) })
end
def call(env)
@app.call(env)
end
def _call(env)
- begin
- run_callbacks :before_dispatch
- Routing::Routes.call(env)
- rescue Exception => exception
- if controller ||= (::ApplicationController rescue Base)
- controller.call_with_exception(env, exception).to_a
- else
- raise exception
- end
- ensure
- run_callbacks :after_dispatch, :enumerator => :reverse_each
- end
+ @env = env
+ dispatch
end
def flush_logger

0 comments on commit d775103

Please sign in to comment.