From: Tom Hughes Date: Thu, 1 Nov 2012 09:13:43 +0000 (+0000) Subject: Add a newline to the end of the body when reporting an error X-Git-Tag: live~5254 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/59c97f4866652c025ec4f61cabcaaedd3124ab33?ds=sidebyside Add a newline to the end of the body when reporting an error There seems to be some sort problem with ruby 1.9 where a response body that is a single line with no newline causes the response not to be sent properly. --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 70a635404..a0e0e20dc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -243,7 +243,7 @@ class ApplicationController < ActionController::Base render :text => result.to_s, :content_type => "text/xml" else - render :text => message, :status => status + render :text => message + "\n", :status => status end end