rushmorem / publicsuffix

An implementation of Mozilla's Public Suffix List in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why is domain that has a suffix that is not on the list returns true in `has_known_suffix` function?

ivanceras opened this issue · comments

I couldn't find ae1 in the list, why does the domain type an Icann?

if let Ok(domain) = PUBLIC_SUFFIX_LIST.parse_domain(domain_name) {
        println!("domain: {:#?}", domain);
        if domain.has_known_suffix() {
            println!("Yes, this domain has a known suffix");
     }
}
domain: Domain {
    full: "co.ae1",
    typ: Some(
        Icann,
    ),
    suffix: Some(
        "ae1",
    ),
    registrable: Some(
        "co.ae1",
    ),
}
Yes, this domain has a known suffix
domain: Domain {
    full: "co.ae11",
    typ: Some(
        Icann,
    ),
    suffix: Some(
        "ae11",
    ),
    registrable: Some(
        "co.ae11",
    ),
}
Yes, this domain has a known suffix