Parsing fails to get etld1 when the input URL matches a non icann address.
For example:
https://github.iohttps://myshopify.com
It fails with the following error:
publicsuffix: cannot derive eTLD+1 for domain "github.com"
This failure is expected, given those domains are registered as private suffixes.
The suggested hack handles this so that when it fails, it set etld1 to dom for non icann and only if the returned suffix equals to the dom
Parsing fails to get
etld1
when the input URL matches a non icann address. For example:https://github.io
https://myshopify.com
It fails with the following error:publicsuffix: cannot derive eTLD+1 for domain "github.com"
This failure is expected, given those domains are registered as private suffixes.The suggested hack handles this so that when it fails, it set
etld1
todom
for non icann and only if the returned suffix equals to the dom