diff options
author | corvid <devnull@localhost> | 2014-10-22 01:29:46 +0000 |
---|---|---|
committer | corvid <devnull@localhost> | 2014-10-22 01:29:46 +0000 |
commit | 6339752fb3fa2790c293bce40282bcf21cdf1918 (patch) | |
tree | d13eab9825224ec98659f9461be37166eb71a12b | |
parent | d6cf4437d0acac5831bb7e391569794c2dfa0151 (diff) |
trim the publicsuffix TLDs yet again
in January 2010, there were 42 entries. Now there are 22, and nearly all of
them are rather...marginal.
-rw-r--r-- | dpi/cookies.c | 7 | ||||
-rw-r--r-- | src/url.c | 11 | ||||
-rw-r--r-- | test/cookies.c | 16 |
3 files changed, 15 insertions, 19 deletions
diff --git a/dpi/cookies.c b/dpi/cookies.c index 6c5e958e..b858bd53 100644 --- a/dpi/cookies.c +++ b/dpi/cookies.c @@ -1042,14 +1042,13 @@ static uint_t Cookies_internal_dots_required(const char *host) if (tld_len > 0) { /* These TLDs were chosen by examining the current publicsuffix list - * in February 2014 and picking out those where it was simplest for + * in October 2014 and picking out those where it was simplest for * them to describe the situation by beginning with a "*.[tld]" rule * or every rule was "[something].[tld]". */ - const char *const tlds[] = {"bd","bn","ck","cy","er","et","fj","fk", + const char *const tlds[] = {"bd","bn","ck","cy","er","fj","fk", "gu","il","jm","ke","kh","kw","mm","mz", - "ni","np","nz","pg","tr","uk","ye","za", - "zm","zw"}; + "ni","np","pg","ye","za","zm","zw"}; uint_t i, tld_num = sizeof(tlds) / sizeof(tlds[0]); for (i = 0; i < tld_num; i++) { @@ -688,20 +688,17 @@ static uint_t Url_host_public_internal_dots(const char *host) if (tld_len > 0) { /* These TLDs were chosen by examining the current publicsuffix list - * in February 2014 and picking out those where it was simplest for + * in October 2014 and picking out those where it was simplest for * them to describe the situation by beginning with a "*.[tld]" rule * or every rule was "[something].[tld]". * * TODO: Consider the old publicsuffix code again. This TLD list has * shrunk and shrunk over the years, and has become a poorer and - * poorer approximation of administrative boundaries -- and, as of - * mid-2014, even NZ and UK are allowing domains to be registered - * at the second level, which doesn't leave much. + * poorer approximation of administrative boundaries. */ - const char *const tlds[] = {"bd","bn","ck","cy","er","et","fj","fk", + const char *const tlds[] = {"bd","bn","ck","cy","er","fj","fk", "gu","il","jm","ke","kh","kw","mm","mz", - "ni","np","nz","pg","tr","uk","ye","za", - "zm","zw"}; + "ni","np","pg","ye","za","zm","zw"}; uint_t i, tld_num = sizeof(tlds) / sizeof(tlds[0]); for (i = 0; i < tld_num; i++) { diff --git a/test/cookies.c b/test/cookies.c index 40661650..ff744c97 100644 --- a/test/cookies.c +++ b/test/cookies.c @@ -880,17 +880,17 @@ int main() path(); /* LEADING/TRAILING DOTS AND A LITTLE PUBLIC SUFFIX */ - a_Cookies_set("name=val; domain=co.uk", "www.co.uk", "/", NULL); - expect(__LINE__, "", "http", "www.co.uk", "/"); + a_Cookies_set("name=val; domain=co.il", "www.co.il", "/", NULL); + expect(__LINE__, "", "http", "www.co.il", "/"); - a_Cookies_set("name=val; domain=.co.uk", "www.co.uk", "/", NULL); - expect(__LINE__, "", "http", "www.co.uk", "/"); + a_Cookies_set("name=val; domain=.co.il", "www.co.il", "/", NULL); + expect(__LINE__, "", "http", "www.co.il", "/"); - a_Cookies_set("name=val; domain=co.uk.", "www.co.uk.", "/", NULL); - expect(__LINE__, "", "http", "www.co.uk.", "/"); + a_Cookies_set("name=val; domain=co.il.", "www.co.il.", "/", NULL); + expect(__LINE__, "", "http", "www.co.il.", "/"); - a_Cookies_set("name=val; domain=.co.uk.", "www.co.uk.", "/", NULL); - expect(__LINE__, "", "http", ".www.co.uk.", "/"); + a_Cookies_set("name=val; domain=.co.il.", "www.co.il.", "/", NULL); + expect(__LINE__, "", "http", ".www.co.il.", "/"); a_Cookies_set("name=val; domain=co.org", "www.co.org", "/", NULL); expect(__LINE__, "Cookie: name=val\r\n", "http", "www.co.org", "/"); |