]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Remove require_user for the api_details method as that uses HTTP authentication.
[rails.git] / app / controllers / user_controller.rb
index b1a37872bd6922a485b080a3dc72caed3ec24219..5eba0e8373a0392b2078d104adb5998a98ad78d7 100644 (file)
@@ -165,12 +165,12 @@ class UserController < ApplicationController
       @user.save!
       render :nothing => true
     else
-      render :status => 400, :nothing => true
+      render :nothing => true, :status => :method_not_allowed
     end
   end
 
   def api_details
-    render :text => @user.to_xml.to_s
+    render :text => @user.to_xml.to_s, :content_type => "text/xml"
   end
 
   def api_gpx_files
@@ -178,7 +178,7 @@ class UserController < ApplicationController
     @user.traces.each do |trace|
       doc.root << trace.to_xml_node() if trace.public? or trace.user == @user
     end
-    render :text => doc.to_s
+    render :text => doc.to_s, :content_type => "text/xml"
   end
 
   def view