-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fails to parse hostnames with leading .
#1523
Comments
Hey @sammacbeth, I've done a bit of research and found some contradictory information on the matter, which is a bit puzzling. Let me share what I have and we can decide on the best way forward:
So it seems that at least the On the other hand, the public suffix list seems to forbid hostnames with leading dots. Since This would probably warrant a breaking change version bump, though. What do you think? |
@sammacbeth I have just published a new release which I believe should fix the issues reported here. Let me know how it works for you. |
Domains with leading
.
are not parsed by this library. e.g.It is not clear to me if a leading
.
is invalid in a hostname from the available specs. TheURL
spec is very loose on the definition of a valid hostname, and the implementation in browsers accepts such a hostname:Additionally, the leading dot notation is commonly used for cookies which span all subdomains of a given domain. This kind of notation is acknowledged as possible in the
domain
part of a cookie string (though apparently ignore in modern implementations):The text was updated successfully, but these errors were encountered: