예제 #1
0
파일: kickstart.py 프로젝트: R4M80MrX/eve-1
 def __call__(self, environ, start_response):
     request = environ['werkzeug.request']
     if request.session_store is not None:
         request.session_store.save_if_modified(request.session)
         if request.cookie_name not in request.cookies:
             self.set_cookie(request.cookie_name, request.session.sid)
     return ResponseBase.__call__(self, environ, start_response)
예제 #2
0
    def __call__(self, environ, start_response):
        # get the request object
        request = environ['werkzeug.request']

        if request.session_store is not None:
            # save the session if neccessary
            request.session_store.save_if_modified(request.session)

            # set the cookie for the browser if it is not there:
            if request.cookie_name not in request.cookies:
                self.set_cookie(request.cookie_name, request.session.sid)

        # go on with normal response business
        return ResponseBase.__call__(self, environ, start_response)
예제 #3
0
    def __call__(self, environ, start_response):
        # get the request object
        request = environ['werkzeug.request']

        if request.session_store is not None:
            # save the session if neccessary
            request.session_store.save_if_modified(request.session)

            # set the cookie for the browser if it is not there:
            if request.cookie_name not in request.cookies:
                self.set_cookie(request.cookie_name, request.session.sid)

        # go on with normal response business
        return ResponseBase.__call__(self, environ, start_response)