Skip to content

Commit

Permalink
Don't return bare string as rack body
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Apr 27, 2009
1 parent e44cd41 commit a88ddf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/action_dispatch/middleware/failsafe.rb
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion actionpack/test/controller/dispatcher_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit a88ddf8

Please sign in to comment.