Module: ServiceBroker

Defined in:
lib/appcelerator/service_broker_controller.rb

Instance Method Summary collapse

Instance Method Details

#dispatchObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/appcelerator/service_broker_controller.rb', line 18

def dispatch	    
 		session = request.session
 		
     # we check to make sure we're coming from an XHR request
     # this is easy to forge but a simple check
     #
 	  if not request.xml_http_request? and not request.xhr?
       logger.error("client error = not XHR request")
       session.delete
 	    render :nothing => true, :status => 400
 	    return
     end
   
 		response.headers['Content-Type'] = 'text/xml' 
 		response.headers['Pragma'] = 'no-cache'
 		response.headers['Cache-Control'] = 'no-cache, no-store, private, must-revalidate'
 		response.headers['Expires'] = 'Mon, 26 Jul 1997 05:00:00 GMT'

 		Appcelerator::Dispatcher.dispatch_request(request,response,session)

     @performed_render = true
end

#log_processingObject



14
15
16
# File 'lib/appcelerator/service_broker_controller.rb', line 14

def log_processing
  # turn off logging since we get a lot of these requests
end