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
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Yeah, I've been putting this off until someone asks for it.
It seems like the only change is that a hostname can be /^\[[a-fA-F0-9:.]+\]$/, right? The issue, of course, is that node's http client doesn't know how to request to hosts like that, does it?
Actually the hostname is only the part between the brackets (=the IPv6 address); node is OK with those (e.g. http.request() gets host and port separately, and works with host = IPv6 address).
The host field is the one that needs the brackets to differentiate between the IPv6 address and the port.
parseHost() needs to check for brackets and remove them before assigning to out.hostname.
urlFormat() needs to add brackets if obj.hostname contains at least one colon.
It appears that url.js does not know how to parse litteral IPv6 addresses in URLs (RFC2732).
The RFC gives the following examples:
In node.js these will be parsed with the IPv6 address ending up in the pathname field.
The text was updated successfully, but these errors were encountered: