From 561edbe71ff70abc3c0c63c6c05770b434f9b0a9 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 5 Jul 2012 22:39:15 -0700 Subject: Failsafe exception returns text/plain. It's best to just return text/plain when something has gone terribly wrong. Fixes #5660. --- actionpack/lib/action_dispatch/middleware/show_exceptions.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb index ab740a0190..402f29cd76 100644 --- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb @@ -15,11 +15,11 @@ module ActionDispatch # If any exception happens inside the exceptions app, this middleware # catches the exceptions and returns a FAILSAFE_RESPONSE. class ShowExceptions - FAILSAFE_RESPONSE = [500, {'Content-Type' => 'text/html'}, - ["

500 Internal Server Error

" << + FAILSAFE_RESPONSE = [500, { 'Content-Type' => 'text/plain' }, + ["500 Internal Server Error\n" << "If you are the administrator of this website, then please read this web " << "application's log file and/or the web server's log file to find out what " << - "went wrong."]] + "went wrong."]] def initialize(app, exceptions_app) @app = app -- cgit v1.2.3