Skip to content

Commit c6de02e

Browse files
committed
Updates to latest version of list, updates test cases to match
1 parent 27ad589 commit c6de02e

File tree

3 files changed

+154
-45
lines changed

3 files changed

+154
-45
lines changed

data/public-suffix-list.php

Lines changed: 146 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -437,50 +437,32 @@
437437
),
438438
'ar' =>
439439
array (
440-
'*' =>
441-
array (
442-
),
443-
'congresodelalengua3' =>
444-
array (
445-
'!' => '',
446-
),
447-
'educ' =>
448-
array (
449-
'!' => '',
450-
),
451-
'gobiernoelectronico' =>
440+
'com' =>
452441
array (
453-
'!' => '',
442+
'blogspot' =>
443+
array (
444+
),
454445
),
455-
'mecon' =>
446+
'edu' =>
456447
array (
457-
'!' => '',
458448
),
459-
'nacion' =>
449+
'gob' =>
460450
array (
461-
'!' => '',
462451
),
463-
'nic' =>
452+
'int' =>
464453
array (
465-
'!' => '',
466454
),
467-
'promocion' =>
455+
'mil' =>
468456
array (
469-
'!' => '',
470457
),
471-
'retina' =>
458+
'net' =>
472459
array (
473-
'!' => '',
474460
),
475-
'uba' =>
461+
'org' =>
476462
array (
477-
'!' => '',
478463
),
479-
'com' =>
464+
'tur' =>
480465
array (
481-
'blogspot' =>
482-
array (
483-
),
484466
),
485467
),
486468
'arpa' =>
@@ -611,6 +593,9 @@
611593
'id' =>
612594
array (
613595
),
596+
'csiro' =>
597+
array (
598+
),
614599
'info' =>
615600
array (
616601
),
@@ -1659,11 +1644,47 @@
16591644
),
16601645
'com' =>
16611646
array (
1662-
'elasticbeanstalk' =>
1663-
array (
1664-
),
16651647
'amazonaws' =>
16661648
array (
1649+
'compute' =>
1650+
array (
1651+
'ap-northeast-1' =>
1652+
array (
1653+
),
1654+
'ap-southeast-1' =>
1655+
array (
1656+
),
1657+
'ap-southeast-2' =>
1658+
array (
1659+
),
1660+
'eu-west-1' =>
1661+
array (
1662+
),
1663+
'sa-east-1' =>
1664+
array (
1665+
),
1666+
'us-gov-west-1' =>
1667+
array (
1668+
),
1669+
'us-west-1' =>
1670+
array (
1671+
),
1672+
'us-west-2' =>
1673+
array (
1674+
),
1675+
),
1676+
'us-east-1' =>
1677+
array (
1678+
),
1679+
'compute-1' =>
1680+
array (
1681+
'z-1' =>
1682+
array (
1683+
),
1684+
'z-2' =>
1685+
array (
1686+
),
1687+
),
16671688
'elb' =>
16681689
array (
16691690
),
@@ -1725,6 +1746,9 @@
17251746
array (
17261747
),
17271748
),
1749+
'elasticbeanstalk' =>
1750+
array (
1751+
),
17281752
'betainabox' =>
17291753
array (
17301754
),
@@ -1785,6 +1809,12 @@
17851809
'za' =>
17861810
array (
17871811
),
1812+
'cloudcontrolled' =>
1813+
array (
1814+
),
1815+
'cloudcontrolapp' =>
1816+
array (
1817+
),
17881818
'dreamhosters' =>
17891819
array (
17901820
),
@@ -2238,6 +2268,9 @@
22382268
'writesthisblog' =>
22392269
array (
22402270
),
2271+
'ro' =>
2272+
array (
2273+
),
22412274
'appspot' =>
22422275
array (
22432276
),
@@ -2253,6 +2286,12 @@
22532286
'googlecode' =>
22542287
array (
22552288
),
2289+
'herokuapp' =>
2290+
array (
2291+
),
2292+
'herokussl' =>
2293+
array (
2294+
),
22562295
'operaunite' =>
22572296
array (
22582297
),
@@ -12320,6 +12359,30 @@
1232012359
'webhop' =>
1232112360
array (
1232212361
),
12362+
'fastly' =>
12363+
array (
12364+
'ssl' =>
12365+
array (
12366+
'a' =>
12367+
array (
12368+
),
12369+
'b' =>
12370+
array (
12371+
),
12372+
'global' =>
12373+
array (
12374+
),
12375+
),
12376+
'prod' =>
12377+
array (
12378+
'a' =>
12379+
array (
12380+
),
12381+
'global' =>
12382+
array (
12383+
),
12384+
),
12385+
),
1232312386
'za' =>
1232412387
array (
1232512388
),
@@ -12359,16 +12422,13 @@
1235912422
),
1236012423
'ng' =>
1236112424
array (
12362-
'ac' =>
12363-
array (
12364-
),
1236512425
'com' =>
1236612426
array (
1236712427
),
1236812428
'edu' =>
1236912429
array (
1237012430
),
12371-
'gov' =>
12431+
'name' =>
1237212432
array (
1237312433
),
1237412434
'net' =>
@@ -12377,6 +12437,18 @@
1237712437
'org' =>
1237812438
array (
1237912439
),
12440+
'sch' =>
12441+
array (
12442+
),
12443+
'gov' =>
12444+
array (
12445+
),
12446+
'mil' =>
12447+
array (
12448+
),
12449+
'mobi' =>
12450+
array (
12451+
),
1238012452
),
1238112453
'ni' =>
1238212454
array (
@@ -14753,7 +14825,31 @@
1475314825
),
1475414826
'om' =>
1475514827
array (
14756-
'*' =>
14828+
'co' =>
14829+
array (
14830+
),
14831+
'com' =>
14832+
array (
14833+
),
14834+
'edu' =>
14835+
array (
14836+
),
14837+
'gov' =>
14838+
array (
14839+
),
14840+
'med' =>
14841+
array (
14842+
),
14843+
'museum' =>
14844+
array (
14845+
),
14846+
'net' =>
14847+
array (
14848+
),
14849+
'org' =>
14850+
array (
14851+
),
14852+
'pro' =>
1475714853
array (
1475814854
),
1475914855
'mediaphone' =>
@@ -16752,7 +16848,19 @@
1675216848
),
1675316849
'sv' =>
1675416850
array (
16755-
'*' =>
16851+
'com' =>
16852+
array (
16853+
),
16854+
'edu' =>
16855+
array (
16856+
),
16857+
'gob' =>
16858+
array (
16859+
),
16860+
'org' =>
16861+
array (
16862+
),
16863+
'red' =>
1675616864
array (
1675716865
),
1675816866
),

tests/library/Pdp/CheckPublicSuffixTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ public function testPublicSuffixSpec()
8383
$this->checkPublicSuffix('city.kobe.jp', 'city.kobe.jp');
8484
$this->checkPublicSuffix('www.city.kobe.jp', 'city.kobe.jp');
8585
// TLD with a wildcard rule and exceptions.
86-
$this->checkPublicSuffix('om', null);
87-
$this->checkPublicSuffix('test.om', null);
88-
$this->checkPublicSuffix('b.test.om', 'b.test.om');
89-
$this->checkPublicSuffix('a.b.test.om', 'b.test.om');
90-
$this->checkPublicSuffix('songfest.om', 'songfest.om');
91-
$this->checkPublicSuffix('www.songfest.om', 'songfest.om');
86+
$this->checkPublicSuffix('ck', null);
87+
$this->checkPublicSuffix('test.ck', null);
88+
$this->checkPublicSuffix('b.test.ck', 'b.test.ck');
89+
$this->checkPublicSuffix('a.b.test.ck', 'b.test.ck');
90+
$this->checkPublicSuffix('www.ck', 'www.ck');
91+
$this->checkPublicSuffix('www.www.ck', 'www.ck');
9292
// US K12.
9393
$this->checkPublicSuffix('us', null);
9494
$this->checkPublicSuffix('test.us', 'test.us');

tests/library/Pdp/ParserTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public function testPHPparse_urlCanReturnCorrectHost($url, $publicSuffix, $regis
7878

7979
public function parseDataProvider()
8080
{
81+
// url, public suffix, registerable domain, subdomain, host part
8182
return array(
8283
array('http://www.waxaudio.com.au/audio/albums/the_mashening', 'com.au', 'waxaudio.com.au', 'www', 'www.waxaudio.com.au'),
8384
array('example.com', 'com', 'example.com', null, 'example.com'),
@@ -91,7 +92,7 @@ public function parseDataProvider()
9192
array('b.ide.kyoto.jp', 'ide.kyoto.jp', 'b.ide.kyoto.jp', null, 'b.ide.kyoto.jp'),
9293
array('a.b.example.uk.com', 'uk.com', 'example.uk.com', 'a.b', 'a.b.example.uk.com'),
9394
array('test.nic.ar', 'ar', 'nic.ar', 'test', 'test.nic.ar'),
94-
array('a.b.test.om', 'test.om', 'b.test.om', 'a', 'a.b.test.om'),
95+
array('a.b.test.ck', 'test.ck', 'b.test.ck', 'a', 'a.b.test.ck'),
9596
array('baez.songfest.om', 'om', 'songfest.om', 'baez', 'baez.songfest.om'),
9697
array('politics.news.omanpost.om', 'om', 'omanpost.om', 'politics.news', 'politics.news.omanpost.om'),
9798
// BEGIN https://github.com/jeremykendall/php-domain-parser/issues/16

0 commit comments

Comments
 (0)