aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-06-20 23:13:19 +0200
committerXavier Noria <fxn@hashref.com>2010-06-20 23:13:19 +0200
commit207fa59675cb624dde0e01c1d57597f752cdf095 (patch)
tree472d03af5bc3e2df1b759717f723ca914f2a77aa /actionpack/lib/action_dispatch/middleware
parent31cadc730a40281950a265ff6982dd76cc326828 (diff)
parent50d37a76064239a731f81a4ba68b80946c4dfae2 (diff)
downloadrails-207fa59675cb624dde0e01c1d57597f752cdf095.tar.gz
rails-207fa59675cb624dde0e01c1d57597f752cdf095.tar.bz2
rails-207fa59675cb624dde0e01c1d57597f752cdf095.zip
Merge remote branch 'rails/master'
Conflicts: actionpack/lib/abstract_controller/base.rb
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r--actionpack/lib/action_dispatch/middleware/callbacks.rb8
-rw-r--r--actionpack/lib/action_dispatch/middleware/show_exceptions.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/callbacks.rb b/actionpack/lib/action_dispatch/middleware/callbacks.rb
index d07841218a..e4ae480bfb 100644
--- a/actionpack/lib/action_dispatch/middleware/callbacks.rb
+++ b/actionpack/lib/action_dispatch/middleware/callbacks.rb
@@ -8,7 +8,7 @@ module ActionDispatch
class Callbacks
include ActiveSupport::Callbacks
- define_callbacks :call, :terminator => "result == false", :rescuable => true
+ define_callbacks :call, :rescuable => true
define_callbacks :prepare, :scope => :name
# Add a preparation callback. Preparation callbacks are run before every
@@ -37,12 +37,12 @@ module ActionDispatch
def initialize(app, prepare_each_request = false)
@app, @prepare_each_request = app, prepare_each_request
- run_callbacks(:prepare)
+ _run_prepare_callbacks
end
def call(env)
- run_callbacks(:call) do
- run_callbacks(:prepare) if @prepare_each_request
+ _run_call_callbacks do
+ _run_prepare_callbacks if @prepare_each_request
@app.call(env)
end
end
diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
index 0a6d2bfc8a..e095b51342 100644
--- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -122,7 +122,7 @@ module ActionDispatch
end
def render(status, body)
- [status, {'Content-Type' => 'text/html', 'Content-Length' => body.length.to_s}, [body]]
+ [status, {'Content-Type' => 'text/html', 'Content-Length' => body.bytesize.to_s}, [body]]
end
def public_path