'Parse the header with the HTTP method in it'

def parse_http_line(self, http_line, http_methods):

    http_line_split = http_line.split()
    method = ''
    path = ''
    if (len(http_line_split) > 1):
        method = http_line_split[0]
        path = http_line_split[1]
    if ((method + '    ') not in http_methods):
        method = None
        path = None
    return (method, path)
