'Parse the next HTTP request start-line and message-headers.'

def parse_request(self):

    self.rfile = SizeCheckWrapper(self.conn.rfile, self.server.max_request_header_size)
    try:
        success = self.read_request_line()
    except MaxSizeExceeded:
        self.simple_response('414    Request-URI    Too    Long', 'The    Request-URI    sent    with    the    request    exceeds    the    maximum    allowed    bytes.')
        return
    else:
        if (not success):
            return
    try:
        success = self.read_request_headers()
    except MaxSizeExceeded:
        self.simple_response('413    Request    Entity    Too    Large', 'The    headers    sent    with    the    request    exceed    the    maximum    allowed    bytes.')
        return
    else:
        if (not success):
            return
    self.ready = True
