mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
parent
e42b029155
commit
91621cfcd2
@ -64,7 +64,8 @@ size_t TLDListsHolder::parseAndAddTldList(const std::string & name, const std::s
|
||||
while (!in.eof())
|
||||
{
|
||||
readEscapedStringUntilEOL(line, in);
|
||||
++in.position();
|
||||
if (!in.eof())
|
||||
++in.position();
|
||||
/// Skip comments
|
||||
if (line.size() > 2 && line[0] == '/' && line[1] == '/')
|
||||
continue;
|
||||
|
@ -1,5 +1,6 @@
|
||||
<yandex>
|
||||
<top_level_domains_lists>
|
||||
<public_suffix_list>public_suffix_list.dat</public_suffix_list>
|
||||
<no_new_line_list>no_new_line_list.dat</no_new_line_list>
|
||||
</top_level_domains_lists>
|
||||
</yandex>
|
||||
|
1
tests/config/top_level_domains/no_new_line_list.dat
Normal file
1
tests/config/top_level_domains/no_new_line_list.dat
Normal file
@ -0,0 +1 @@
|
||||
foo.bar
|
@ -28,3 +28,7 @@ foo
|
||||
-- vector
|
||||
xx.blogspot.co.at
|
||||
|
||||
-- no new line
|
||||
foo.bar
|
||||
a.foo.bar
|
||||
foo.baz
|
||||
|
@ -37,3 +37,8 @@ select cutToFirstSignificantSubdomainCustom('http://www.foo', 'public_suffix_lis
|
||||
select '-- vector';
|
||||
select cutToFirstSignificantSubdomainCustom('http://xx.blogspot.co.at/' || toString(number), 'public_suffix_list') from numbers(1);
|
||||
select cutToFirstSignificantSubdomainCustom('there-is-no-such-domain' || toString(number), 'public_suffix_list') from numbers(1);
|
||||
|
||||
select '-- no new line';
|
||||
select cutToFirstSignificantSubdomainCustom('foo.bar', 'no_new_line_list');
|
||||
select cutToFirstSignificantSubdomainCustom('a.foo.bar', 'no_new_line_list');
|
||||
select cutToFirstSignificantSubdomainCustom('a.foo.baz', 'no_new_line_list');
|
||||
|
Loading…
Reference in New Issue
Block a user