diff options
Diffstat (limited to 'lib/rack/common_logger.rb')
-rw-r--r-- | lib/rack/common_logger.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rack/common_logger.rb b/lib/rack/common_logger.rb index 42bc135b..2feb0674 100644 --- a/lib/rack/common_logger.rb +++ b/lib/rack/common_logger.rb @@ -40,9 +40,10 @@ module Rack # cause the request not to be logged. def call(env) began_at = Utils.clock_time - status, headers, body = @app.call(env) - body = BodyProxy.new(body) { log(env, status, headers, began_at) } - [status, headers, body] + status, headers, body = response = @app.call(env) + + response[2] = BodyProxy.new(body) { log(env, status, headers, began_at) } + response end private |