From: Tom Hughes Date: Tue, 14 Aug 2007 13:59:07 +0000 (+0000) Subject: Don't create sessions for API calls. X-Git-Tag: live~8809 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/e70d94c54a3c449bc12e99d0f3a01a3ef20fc0ab Don't create sessions for API calls. --- diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index 47f8f2458..2e2f112cd 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -1,6 +1,7 @@ class AmfController < ApplicationController require 'stringio' + session :off before_filter :check_availability # to log: diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 62633dbb3..39706edf0 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -1,5 +1,6 @@ class ApiController < ApplicationController + session :off after_filter :compress_output #COUNT is the number of map requests to allow before exiting and starting a new process diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb index fba41e330..5d50df7e6 100644 --- a/app/controllers/node_controller.rb +++ b/app/controllers/node_controller.rb @@ -1,6 +1,7 @@ class NodeController < ApplicationController require 'xml/libxml' + session :off before_filter :authorize, :only => [:create, :update, :delete] before_filter :check_availability, :only => [:create, :update, :delete] after_filter :compress_output diff --git a/app/controllers/old_node_controller.rb b/app/controllers/old_node_controller.rb index 27e233b2f..0337cb2cf 100644 --- a/app/controllers/old_node_controller.rb +++ b/app/controllers/old_node_controller.rb @@ -1,6 +1,7 @@ class OldNodeController < ApplicationController require 'xml/libxml' + session :off after_filter :compress_output def history diff --git a/app/controllers/old_segment_controller.rb b/app/controllers/old_segment_controller.rb index be5de7afd..2d48fb5b9 100644 --- a/app/controllers/old_segment_controller.rb +++ b/app/controllers/old_segment_controller.rb @@ -1,6 +1,7 @@ class OldSegmentController < ApplicationController require 'xml/libxml' + session :off after_filter :compress_output def history diff --git a/app/controllers/old_way_controller.rb b/app/controllers/old_way_controller.rb index 16db86555..f10e0d2f0 100644 --- a/app/controllers/old_way_controller.rb +++ b/app/controllers/old_way_controller.rb @@ -1,6 +1,7 @@ class OldWayController < ApplicationController require 'xml/libxml' + session :off after_filter :compress_output def history diff --git a/app/controllers/segment_controller.rb b/app/controllers/segment_controller.rb index 070c2be81..42e939a65 100644 --- a/app/controllers/segment_controller.rb +++ b/app/controllers/segment_controller.rb @@ -1,6 +1,7 @@ class SegmentController < ApplicationController require 'xml/libxml' + session :off before_filter :authorize, :only => [:create, :update, :delete] before_filter :check_availability, :only => [:create, :update, :delete] after_filter :compress_output diff --git a/app/controllers/swf_controller.rb b/app/controllers/swf_controller.rb index 9a4516016..4e7e1c8ee 100644 --- a/app/controllers/swf_controller.rb +++ b/app/controllers/swf_controller.rb @@ -1,5 +1,6 @@ class SwfController < ApplicationController - before_filter :check_availability + session :off + before_filter :check_availability # to log: # RAILS_DEFAULT_LOGGER.error("Args: #{args[0]}, #{args[1]}, #{args[2]}, #{args[3]}") diff --git a/app/controllers/way_controller.rb b/app/controllers/way_controller.rb index b1adf25a2..d6489fef8 100644 --- a/app/controllers/way_controller.rb +++ b/app/controllers/way_controller.rb @@ -1,6 +1,7 @@ class WayController < ApplicationController require 'xml/libxml' + session :off before_filter :authorize, :only => [:create, :update, :delete] before_filter :check_availability, :only => [:create, :update, :delete] after_filter :compress_output