def verify_allow(value, expected):
    """
    Verify Allow header methods.
    """
    if value is None:
        return False
    if value[-1] == ",":
        value = value[:-1]
    methods = value.split(",")
    methods = [m.strip() for m in methods]
    if len(expected) != len(methods):
        return False
    for exp in expected:
        if exp not in methods:
            return False
    return True