Made way controller return text/xml instead of text/html. Fixes #450
Also fixed some line endings and trailing spaces.
This commit is contained in:
parent
164b05ea96
commit
6ace541442
1 changed files with 7 additions and 4 deletions
|
@ -5,6 +5,7 @@ class WayController < ApplicationController
|
|||
after_filter :compress_output
|
||||
|
||||
def create
|
||||
response.headers["Content-Type"] = 'text/xml'
|
||||
if request.put?
|
||||
way = Way.from_xml(request.raw_post, true)
|
||||
|
||||
|
@ -68,12 +69,14 @@ class WayController < ApplicationController
|
|||
end
|
||||
|
||||
def rest
|
||||
response.headers["Content-Type"] = 'text/xml'
|
||||
unless Way.exists?(params[:id])
|
||||
render :nothing => true, :status => 404
|
||||
return
|
||||
end
|
||||
|
||||
way = Way.find(params[:id])
|
||||
|
||||
case request.method
|
||||
|
||||
when :get
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue