From c0cd25178b083e476178805282872591a81aa11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Wed, 21 Feb 2018 20:49:26 +0100 Subject: [PATCH] Add TLDs to (DAFSA) data to allow skipping the star rule --- src/psl-make-dafsa | 2 -- src/psl.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/psl-make-dafsa b/src/psl-make-dafsa index 3ce4a9d..b569310 100755 --- a/src/psl-make-dafsa +++ b/src/psl-make-dafsa @@ -586,8 +586,6 @@ def parse_psl(infile, utf_mode, codecs): flags = PSL_FLAG_WILDCARD | PSL_FLAG_PLAIN | section line = line[2:] else: - if not b'.' in line: - continue # we do not need an explicit plain TLD rule, already covered by implicit '*' rule psl_nsuffixes += 1 flags = PSL_FLAG_PLAIN | section diff --git a/src/psl.c b/src/psl.c index 52df98b..aae6644 100644 --- a/src/psl.c +++ b/src/psl.c @@ -1278,8 +1278,6 @@ psl_ctx_t *psl_load_fp(FILE *fp) psl->nwildcards++; psl->nsuffixes++; } else { - if (!strchr(p, '.')) - continue; /* we do not need an explicit plain TLD rule, already covered by implicit '*' rule */ suffix.flags = _PSL_FLAG_PLAIN | type; psl->nsuffixes++; } @@ -1895,7 +1893,7 @@ static int _insert_file(const char *fname, const char **psl_fname, time_t *psl_m * - location specified during built-time (filename from ./configure --with-psl-distfile) * - built-in PSL data (generated from ./configure --with-psl-file) * - location of built-in data (filename from ./configure --with-psl-file) - * + * * If none of the above is available, the function returns %NULL. * * To free the allocated resources, call psl_free().