aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-04-27 00:00:03 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-04-27 00:00:03 -0700
commita88ddf8cc327279258cd68b0ad4091a5d54e3507 (patch)
treef6d5a21900de3e06db53f16d1315ca528516651c
parente44cd416208241cd96f75574d6c454fc2101e789 (diff)
downloadrails-a88ddf8cc327279258cd68b0ad4091a5d54e3507.tar.gz
rails-a88ddf8cc327279258cd68b0ad4091a5d54e3507.tar.bz2
rails-a88ddf8cc327279258cd68b0ad4091a5d54e3507.zip
Don't return bare string as rack body
-rw-r--r--actionpack/lib/action_dispatch/middleware/failsafe.rb4
-rw-r--r--actionpack/test/controller/dispatcher_test.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/failsafe.rb b/actionpack/lib/action_dispatch/middleware/failsafe.rb
index 5e0c479fdd..836098482c 100644
--- a/actionpack/lib/action_dispatch/middleware/failsafe.rb
+++ b/actionpack/lib/action_dispatch/middleware/failsafe.rb
@@ -29,9 +29,9 @@ module ActionDispatch
def failsafe_response_body
error_path = "#{self.class.error_file_path}/500.html"
if File.exist?(error_path)
- File.read(error_path)
+ [File.read(error_path)]
else
- "<html><body><h1>500 Internal Server Error</h1></body></html>"
+ ["<html><body><h1>500 Internal Server Error</h1></body></html>"]
end
end
diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb
index 569d698a03..c3bd113b86 100644
--- a/actionpack/test/controller/dispatcher_test.rb
+++ b/actionpack/test/controller/dispatcher_test.rb
@@ -53,7 +53,7 @@ class DispatcherTest < Test::Unit::TestCase
assert_equal [
500,
{"Content-Type" => "text/html"},
- "<html><body><h1>500 Internal Server Error</h1></body></html>"
+ ["<html><body><h1>500 Internal Server Error</h1></body></html>"]
], dispatch
end
end