コード例 #1
0
ファイル: rhnApache.py プロジェクト: bjmingyang/spacewalk
 def cleanupHandler(self, req):
     """
     clean up this session
     """
     log_debug(3)
     self.lang = "C"
     self.clientVersion = self.proxyVersion = 0
     # clear the global flags
     rhnFlags.reset()
     timer(self.start_time)
     return self._cleanup_request_processor()
コード例 #2
0
ファイル: rhnApache.py プロジェクト: yanheven/spacewalk
 def cleanupHandler(self, _req):
     """
     clean up this session
     """
     log_debug(3)
     self.lang = "C"
     self.clientVersion = self.proxyVersion = 0
     # clear the global flags
     rhnFlags.reset()
     timer(self.start_time)
     return self._cleanup_request_processor()
コード例 #3
0
ファイル: rhnApache.py プロジェクト: Kilian-Petsch/spacewalk
    def headerParserHandler(self, req):
        """
        after a request has been received, first thing we do is to create the
        input object
        """
        # pylint: disable=R0911

        log_setreq(req)
        log_debug(3)
        self.start_time = time.time()
        # Decline if this is a subrequest:
        if req.main:
            return apache.DECLINED
        log_debug(4, req.method, req.path_info, req.headers_in)

        # Clear the global flags.
        rhnFlags.reset()
        # Init the transport options.
        rhnFlags.set('outputTransportOptions', UserDictCase())
        # Init the session token dictionary.
        rhnFlags.set("AUTH_SESSION_TOKEN", UserDictCase())

        ret = self._init_request_processor(req)
        if ret != apache.OK:
            return ret

        ret = self._set_client_info(req)
        if ret != apache.OK:
            return ret

        # Check the protocol version
        if req.proto_num < 1001:
            # HTTP protocols prior to 1.1 close the connection
            rhnFlags.get('outputTransportOptions')["Connection"] = "close"

        ret = self._set_proxy_info(req)
        if ret != apache.OK:
            return ret

        # Need to run _set_other first, since _set_lang needs RoodDir set
        ret = self._set_other(req)
        if ret != apache.OK:
            return ret

        ret = self._set_lang(req)
        if ret != apache.OK:
            return ret

        return apache.OK
コード例 #4
0
ファイル: rhnApache.py プロジェクト: yanheven/spacewalk
    def headerParserHandler(self, req):
        """
        after a request has been received, first thing we do is to create the
        input object
        """
        # pylint: disable=R0911

        log_setreq(req)
        log_debug(3)
        self.start_time = time.time()
        # Decline if this is a subrequest:
        if req.main:
            return apache.DECLINED
        log_debug(4, req.method, req.path_info, req.headers_in)

        # Clear the global flags.
        rhnFlags.reset()
        # Init the transport options.
        rhnFlags.set('outputTransportOptions', UserDictCase())
        # Init the session token dictionary.
        rhnFlags.set("AUTH_SESSION_TOKEN", UserDictCase())

        ret = self._init_request_processor(req)
        if ret != apache.OK:
            return ret

        ret = self._set_client_info(req)
        if ret != apache.OK:
            return ret

        # Check the protocol version
        if req.proto_num < 1001:
            # HTTP protocols prior to 1.1 close the connection
            rhnFlags.get('outputTransportOptions')["Connection"] = "close"

        ret = self._set_proxy_info(req)
        if ret != apache.OK:
            return ret

        # Need to run _set_other first, since _set_lang needs RoodDir set
        ret = self._set_other(req)
        if ret != apache.OK:
            return ret

        ret = self._set_lang(req)
        if ret != apache.OK:
            return ret

        return apache.OK