(self, command, path, version)
Method overridden to reduce the function actions
Method overridden to reduce the function actions
Method overridden to reduce the function actions
def requestReceived(self, command, path, version):
        """
        Method overridden to reduce the function actions
        """
        self.method, self.uri = command, path
        self.clientproto = version

        # we get the ip address of the user that can be:
        #  - written in the x-forwared-for header if a proxy is in between
        #  - the ip address of the transport endpoint
        forwarders = self.getForwarders()
        if forwarders:
            self.client = forwarders[0]
        else:
            self.client = self.channel.transport.getPeer()

        self.host = self.channel.transport.getHost()

        self.proto = b'http://' if config.transport == 'HTTP' else b'https://'

        port = self.channel.transport.getHost().port
        self.port = '' if port in [80, 443] else ':%d' % port  # ).encode('utf-8')

        self.process()
def requestReceived ( self , command , path , version ) : self . method , self . uri = command , path self . clientproto = version # we get the ip address of the user that can be: #  - written in the x-forwared-for header if a proxy is in between #  - the ip address of the transport endpoint forwarders = self . getForwarders ( ) if forwarders : self . client = forwarders [ 0 ] else : self . client = self . channel . transport . getPeer ( ) self . host = self . channel . transport . getHost ( ) self . proto = b'http://' if config . transport == 'HTTP' else b'https://' port = self . channel . transport . getHost ( ) . port self . port = '' if port in [ 80 , 443 ] else ':%d' % port # ).encode('utf-8') self . process ( )