예제 #1
0
    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))
예제 #2
0
    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)
예제 #4
0
	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)