(self)
Handle a single HTTP request
Handle a single HTTP request
Handle a single HTTP request
def handle(self):
        """Handle a single HTTP request"""

        self.raw_requestline = self.rfile.readline(65537)
        if len(self.raw_requestline) > 65536:
            self.requestline = ''
            self.request_version = ''
            self.command = ''
            self.send_error(414)
            return

        if not self.parse_request(): # An error code has been sent, just exit
            return

        handler = ServerHandler(
            self.rfile, self.wfile, self.get_stderr(), self.get_environ(),
            multithread=False,
        )
        handler.request_handler = self      # backpointer for logging
        handler.run(self.server.get_app())
def handle ( self ) : self . raw_requestline = self . rfile . readline ( 65537 ) if len ( self . raw_requestline ) > 65536 : self . requestline = '' self . request_version = '' self . command = '' self . send_error ( 414 ) return if not self . parse_request ( ) : # An error code has been sent, just exit return handler = ServerHandler ( self . rfile , self . wfile , self . get_stderr ( ) , self . get_environ ( ) , multithread = False , ) handler . request_handler = self # backpointer for logging handler . run ( self . server . get_app ( ) )