]> git.openstreetmap.org Git - rails.git/commitdiff
Add a newline to the end of the body when reporting an error
authorTom Hughes <tom@compton.nu>
Thu, 1 Nov 2012 09:13:43 +0000 (09:13 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 1 Nov 2012 09:13:43 +0000 (09:13 +0000)
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.

app/controllers/application_controller.rb

index 70a635404038efbc04beb0eb8231c85b90db644d..a0e0e20dcf44b0e8405ab5fc24de275079e74f47 100644 (file)
@@ -243,7 +243,7 @@ class ApplicationController < ActionController::Base
 
       render :text => result.to_s, :content_type => "text/xml"
     else
 
       render :text => result.to_s, :content_type => "text/xml"
     else
-      render :text => message, :status => status
+      render :text => message + "\n", :status => status
     end
   end
   
     end
   end