def handle_one_request(self):
try:<EOL><INDENT>self.raw_requestline = self.rfile.readline(<NUM_LIT>)<EOL>if len(self.raw_requestline) > <NUM_LIT>:<EOL><INDENT>self.requestline = '<STR_LIT>'<EOL>self.request_version = '<STR_LIT>'<EOL>self.command = '<STR_LIT>'<EOL>self.send_error("<STR_LIT>")<EOL>return<EOL><DEDENT>if not self.raw_requestline:<EOL><INDENT>self.close_connection = <NUM_LIT:1><EOL>return<EOL><DEDENT>if not self.parse_request():<EOL><INDENT>return<EOL><DEDENT>mname = '<STR_LIT>' + self.command<EOL>if not hasattr(self, mname):<EOL><INDENT>self.send_error("<STR_LIT>" % self.command)<EOL>return<EOL><DEDENT>method = getattr(self, mname)<EOL>method()<EOL>self.wfile.flush()<EOL><DEDENT>except socket.timeout:<EOL><INDENT>self.close_connection = <NUM_LIT:1><EOL>return<EOL><DEDENT>
Handle a request