-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Returns null for tld.getDomain('http://github.io') #117
Comments
Hi @makecontact You are right to point out that any domain from This is a long-standing and known issue which is not trivial to fix. It stems from the fact that the public suffix list was originally designed to check under which domains, sub-domains can be registered, and cookies can be set. In turn, it can lead to surprising/un-intuitive results such as the ones you encountered. We've thought about this situation in the past, and I can see a few solutions, none of which is perfect. But maybe it would be "good enough":
None of the solution is perfect as there are known counter-examples. If this is an option for you, I would suggest you give a try to Also, as far as I know, this should be a limitation for all libraries using the public suffix lists unfortunately. |
@remusao thank you for taking the time to write a good reply. I can appreciate that this is a problem that can't easily be solved but I'm happy with the work arounds you've suggested. |
1, also returns null for |
@lmenus Thanks for coming up with another breaking case. As far as I can tell, this would be fixed by #128. Hopefully we can move this work forward soon! |
@remusao Looks good, thank you for your work on this! |
Always returns null for github.io many others including
etc...
Any takers?
I've tracked it down to any domain that is listed in tlds/rules.json
The text was updated successfully, but these errors were encountered: