You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting! This has been fixed in #11549, which enables stricter parsing of hostnames as specified by the WHATWG URL Standard. The patch should be released in the next v7.x.
One thing to note is that while most browsers seem to accept the URL, #11549 actually throws an error on such cases:
> new url.URL('http://.test.com').hostname
TypeError: Invalid URL
at URL.onParseComplete (internal/url.js:87:11)
at parse (internal/url.js:110:11)
at new URL (internal/url.js:211:5)
at repl:1:1
That is, again, in compliance with the URL Standard.
Currently url is having some issues parsing odd hostnames like so:
Where as in safari, chrome, the native url module and everywhere else this would be parsed as '.test.com'.
The text was updated successfully, but these errors were encountered: