def request(target_host, path, headers):
    if PROXY:
        if protocol:
            path = protocol + '://' + path
        elif target_host.endswith('443'):   #https for 443,9443,...
            path = 'https://' + target_host + path
        else:
            path = 'http://' + target_host + path
        conn = httplib.HTTPConnection(PROXY, timeout=TIMEOUT)
    else:
        if protocol == 'http':
            conn = httplib.HTTPConnection(target_host, timeout=TIMEOUT)
        elif protocol == 'https':
            conn = httplib.HTTPSConnection(target_host, timeout=TIMEOUT)
        elif target_host.endswith('443'):   #https for 443,9443,...
            conn = httplib.HTTPSConnection(target_host, timeout=TIMEOUT)
        else:
            conn = httplib.HTTPConnection(target_host, timeout=TIMEOUT)
    headers=headers
    start = time.time()
    conn.request("GET", path, headers=headers)
    res = conn.getresponse()
    end = time.time()
    delay = start - end
    # print >> sys.stderr, "%s:\t[%s]\t%s %s\t%s" %(target_host, command, res.status, res.reason, delay) 
    # conn.close()
    return (res.status, res.reason, delay, res)
dataset/ETHPy150Open gry/shellshock-scanner/shellshock_scanner.py/request/swapped operands of `-`