def get_host(addr, is_ssl=False):
    """ return a correct Host header """
    host = addr[0]
    if addr[1] != (is_ssl and 443 or 80):
        host = "%s:%s" % (host, addr[1])
    return host
dataset/ETHPy150Open benoitc/tproxy/examples/httpproxy.py/get_host/original