Commits

Ginés Martínez Sánchez committed 044d78a Draft

save channel and gaplic in environment wsgi

  • Participants
  • Parent commits cb0aecb

Comments (0)

Files changed (3)

File docs/index.rst

 GinsFSM
 =======
 
-Do you can draw your development?
+Can you draw your development?
 
-Do you can view the behaviour of your application in real time?
+Can you view the behaviour of your application in real time?
 
 This framework can!.
 

File ginsfsm/protocols/http/server/c_http_clisrv.py

 
 def ac_http_response(self, event):
     response = event.response
+    if response != self.responding_request:
+        logging.error("ERROR doesn't mach response %s" % response.request.path)
     self.stop_responseless_timer()
     self.responding_request = None
 

File ginsfsm/protocols/wsgi/common/wsgi_response.py

 
         request = self.request
         path = request.path
-        gsock = self.gsock
+        channel = request.channel
+        gsock = request.channel.gsock
         wsgi_server = self.wsgi_server
 
         while path and path.startswith('/'):
             path = path[1:]
 
         environ = {}
-        #environ['gsock'] = gsock
+        # Own variables to do asynchronous response
+        environ['channel'] = channel
+        environ['gaplic'] = channel.gaplic
         #environ['ext_event'] = self.ext_event
+
         environ['REQUEST_METHOD'] = request.command.upper()
         environ['SERVER_PORT'] = str(wsgi_server.effective_port)
         environ['SERVER_NAME'] = wsgi_server.server_name