Exemplo n.º 1
0
 def __init__(self, request):
     SessionObject.__init__(self, request.environ, **self._options)
     def session_callback(request, response):
         exception = getattr(request, 'exception', None)
         if (exception is None or self._cookie_on_exception
             and self.accessed()):
             self.persist()
             headers = self.__dict__['_headers']
             if headers['set_cookie'] and headers['cookie_out']:
                 response.headerlist.append(
                     ('Set-Cookie', headers['cookie_out']))
     request.add_response_callback(session_callback)
Exemplo n.º 2
0
        def __init__(self, request):
            SessionObject.__init__(self, request.environ, **self._options)

            def session_callback(request, response):
                exception = getattr(request, "exception", None)
                if exception is None or self._cookie_on_exception and self.accessed():
                    self.persist()
                    headers = self.__dict__["_headers"]
                    if headers["set_cookie"] and headers["cookie_out"]:
                        response.headerlist.append(("Set-Cookie", headers["cookie_out"]))

            request.add_response_callback(session_callback)
Exemplo n.º 3
0
        def __init__(self, request):
            SessionObject.__init__(self, request.environ, **self._options)

            def session_callback(request, response):
                exception = getattr(request, 'exception', None)
                if (exception is None
                        or self._cookie_on_exception and self.accessed()):
                    self.persist()
                    headers = self.__dict__['_headers']
                    if headers['set_cookie'] and headers['cookie_out']:
                        response.headerlist.append(
                            ('Set-Cookie', headers['cookie_out']))

            request.add_response_callback(session_callback)
Exemplo n.º 4
0
 def __init__(self, environ, **params):
     SessionObject.__init__(self, environ, **params)
Exemplo n.º 5
0
 def __init__(self, environ, **params):
     SessionObject.__init__(self, environ, **params)