X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9d6ae5baae9f86acb8e2d9fcb006d8b81167281b..dcad29dad0d29e22ffa0c34a8d9b43cbf5d64f12:/app/controllers/amf_controller.rb diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index 72f1dd74e..1049b51b6 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -33,8 +33,6 @@ class AmfController < ApplicationController bytes=getlong(req) # | get total size in bytes args=getvalue(req) # | get response (probably an array) - RAILS_DEFAULT_LOGGER.info(" Message: #{message}") - case message when 'getpresets'; results[index]=putdata(index,getpresets) when 'whichways'; results[index]=putdata(index,whichways(args)) @@ -48,12 +46,10 @@ class AmfController < ApplicationController # Write out response RAILS_DEFAULT_LOGGER.info(" Response: start") - response.headers["Content-Type"]="application/x-amf" a,b=results.length.divmod(256) - render :text => proc { |response, output| + render :content_type => "application/x-amf", :text => proc { |response, output| output.write 0.chr+0.chr+0.chr+0.chr+a.chr+b.chr results.each do |k,v| - RAILS_DEFAULT_LOGGER.info(" Response: encode #{k}") output.write(v) end }