def host_match(c_host, bw_host):
    """ Check if a cookie `c_host` matches a bw-list `bw_host`. """
    if c_host == bw_host:
        return True
    elif bw_host.startswith('.') and c_host.endswith(bw_host):
        return True
    return False