Permalink
Browse files

Don't return bare string as rack body

  • Loading branch information...
1 parent e44cd41 commit a88ddf8cc327279258cd68b0ad4091a5d54e3507 @jeremy jeremy committed Apr 27, 2009
@@ -29,9 +29,9 @@ def failsafe_response(exception)
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
@@ -53,7 +53,7 @@ def test_failsafe_response
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

0 comments on commit a88ddf8

Please sign in to comment.