def req_session_status(self, session_id): session = SessionsRepository.get(session_id, check_active=False) if session is None: Logger.info("[WebApps] session id={0} not found".format(session_id)) session = Session(session_id, {}) session.status = Session.SESSION_STATUS_UNKNOWN return self.req_answer(self.session2xmlstatus(session))
def req_session_status(self, session_id): session = SessionsRepository.get(session_id, check_active=False) if session is None: Logger.info( "[WebApps] session id={0} not found".format(session_id)) session = Session(session_id, {}) session.status = Session.SESSION_STATUS_UNKNOWN return self.req_answer(self.session2xmlstatus(session))
def process(self, communicator): # Create Context sess_id = SessionsRepository.get_session_id(communicator) session = SessionsRepository.get(sess_id) if sess_id else None if session is None: communicator.send(HTTP_403) return if self.id not in session['published_applications']: communicator.send(HTTP_403) return path = communicator.http.path[len(self.base_path):] index = path.find("$ROOT$") if index != -1: index += len("$ROOT$") path = path[index:] context = Context(communicator, session, path) self.request_processor.process(context) SessionsRepository.set(sess_id, session)
def process(self, communicator): # Create Context sess_id = SessionsRepository.get_session_id(communicator) session = SessionsRepository.get(sess_id) if sess_id else None if session is None: communicator.send(HTTP_403) return if self.id not in session['published_applications']: communicator.send(HTTP_403) return path = communicator.http.path[len(self.base_path):] index = path.find("$ROOT$"); if index != -1: index += len("$ROOT$") path = path[index:] context = Context(communicator, session, path) self.request_processor.process(context) SessionsRepository.set(sess_id, session)