jeremykendall / php-domain-parser

Public Suffix List based domain parsing implemented in PHP
MIT License
1.16k stars 128 forks source link

Exclamation marks and asterisks issue #312

Closed alex-bacart closed 3 years ago

alex-bacart commented 3 years ago

Issue summary

Some suffixes in public_suffix_list.dat are prefixed with exclamation marks or asterisks and it's an issue.

Some examples:

System informations

Information Description
Pdp version 6.0.0
PHP version 8.0.2
OS Platform Ubuntu

Standalone code, or other way to reproduce the problem

echo Rules::fromPath('/public_suffix_list.dat')->resolve('www.city.kawasaki.jp')->registrableDomain()->value();
echo Rules::fromPath('/public_suffix_list.dat')->resolve('www.awdev.ca')->registrableDomain()->value();

Expected result

www.city.kawasaki.jp www.awdev.ca

Actual result

null null

nyamsprod commented 3 years ago

@alex-bacart thanks for using the library. What you are referring to is the syntax of the public suffix list. Please refer to its documentation to understand what that syntax means for resolving accurately the different part of a domain.

The bug you are describing is the expected behaviour.

Hope I have responded correctly to you issue.

alex-bacart commented 3 years ago

Well, actually I don't share your opinion about an expected behavior. But let it be.

nyamsprod commented 3 years ago

Well, actually I don't share your opinion about an expected behavior. But let it be.

Well it is not my opinion, it is the specification and there is a public test suite to confirm that behaviour.

alex-bacart commented 3 years ago

@nyamsprod I've tried to execute my code once again and it seems I was wrong. By bad, sorry. Closing the issue.