X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c38e4bf4a0f76550300386bbabf4bdda943e56c1..1cf9e2ed19b5190e8c4bd2b0c07be4b56097a935:/app/controllers/node_controller.rb diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb index 27c21c481..cc29c09e5 100644 --- a/app/controllers/node_controller.rb +++ b/app/controllers/node_controller.rb @@ -4,8 +4,8 @@ class NodeController < ApplicationController before_filter :authorize after_filter :compress_output - def create - response.headers["Content-Type"] = 'application/xml' + def create + response.headers["Content-Type"] = 'text/xml' if request.put? node = nil begin @@ -19,7 +19,7 @@ class NodeController < ApplicationController node.user_id = @user.id node.visible = 1 if node.save_with_history - render :text => node.id + render :text => node.id.to_s else render :nothing => true, :status => 500 end @@ -35,7 +35,7 @@ class NodeController < ApplicationController end def rest - response.headers["Content-Type"] = 'application/xml' + response.headers["Content-Type"] = 'text/xml' unless Node.exists?(params[:id]) render :nothing => true, :status => 404 return @@ -89,7 +89,7 @@ class NodeController < ApplicationController end def nodes - response.headers["Content-Type"] = 'application/xml' + response.headers["Content-Type"] = 'text/xml' ids = params['nodes'].split(',').collect {|n| n.to_i } if ids.length > 0 nodelist = Node.find(ids)