From ec40b0dc6702470f4e2197f4f3c319ab462926d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarsoly=20Andr=C3=A1s?= Date: Sat, 29 May 2010 22:09:14 +0200 Subject: [PATCH] Use Rack::Utils.bytesize when calculating content-length of exception pages. [#4727 state:resolved] --- .../action_dispatch/middleware/show_exceptions.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb index 2dd2ec9..c04aa82 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 -- 1.7.1