diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-02-29 18:43:49 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-02-29 18:43:55 -0700 |
commit | ceb66b61264657898cd6608c7e9ed78072169664 (patch) | |
tree | 398853e9f0eec69bcc05b1d5463b158c7dc2c755 /actionpack/lib | |
parent | f9995ce0e03444e31d710a06e054365e33fee0d2 (diff) | |
download | rails-ceb66b61264657898cd6608c7e9ed78072169664.tar.gz rails-ceb66b61264657898cd6608c7e9ed78072169664.tar.bz2 rails-ceb66b61264657898cd6608c7e9ed78072169664.zip |
Tap, tap goes the middleware
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/request_id.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/request_id.rb b/actionpack/lib/action_dispatch/middleware/request_id.rb index d5a0b80fd5..6fff94707c 100644 --- a/actionpack/lib/action_dispatch/middleware/request_id.rb +++ b/actionpack/lib/action_dispatch/middleware/request_id.rb @@ -19,10 +19,7 @@ module ActionDispatch def call(env) env["action_dispatch.request_id"] = external_request_id(env) || internal_request_id - status, headers, body = @app.call(env) - - headers["X-Request-Id"] = env["action_dispatch.request_id"] - [ status, headers, body ] + @app.call(env).tap { |status, headers, body| headers["X-Request-Id"] = env["action_dispatch.request_id"] } end private |