Convert tld_serv_list to in_domain()

This commit is contained in:
Marco d'Itri 2014-10-15 15:20:04 +02:00
parent 29b1a3a9c3
commit d961608451
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ while (<>) {
next if /^$/;
die "format error: $_" if not
(my ($a, $b) = /^([\w\d\.-]+)\s+([\w\d\.:-]+|[A-Z]+\s+.*)$/);
(my ($a, $b) = /^\.(\w[\w\d\.-]+)\s+([\w\d\.:-]+|[A-Z]+\s+.*)$/);
$b =~ s/^W(?:EB)?\s+/\\x01/;
$b =~ s/^VERISIGN\s+/\\x04" "/;

View File

@ -524,7 +524,7 @@ char *guess_server(const char *s)
/* check the TLDs list */
for (i = 0; tld_serv[i]; i += 2)
if (domcmp(s, tld_serv[i]))
if (in_domain(s, tld_serv[i]))
return strdup(tld_serv[i + 1]);
/* use the default server name for "new" gTLDs */