- From: Karl <notifications@github.com>
- Date: Thu, 22 Aug 2024 06:26:14 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/issues/599/2304671314@github.com>
When it comes to IP canonicalisation in file URLs, it's worth pointing out that this is only relevant on Windows, and while I expect it is mostly useful for IPv4, the canonicalisation by the standard isn't even entirely correct on Windows because their path syntax does not allow the colons in IPv6 addresses. See: https://en.wikipedia.org/wiki/IPv6_address#Literal_IPv6_addresses_in_UNC_path_names In other words, `file://fe80::1ff:fe23:4567:890a/...` and `file://fe80--1ff-fe23-4567-890a.ipv6-literal.net/...` point to the same host, according to the OS (and you may get the latter from the former by converting to/from a file path). If applications want to reliably handle IPv6 addresses in file paths on Windows, they'll need custom logic to parse/normalise this anyway. So yes, I think it's better to just say these things are opaque from the URL standard's perspective, which allows for this kind of implementation-defined/platform-specific logic. I also think we should document how browsers and other applications are supposed to convert file URLs <-> paths on the major operating systems, since there's lots of divergence there as well. That's filed as https://github.com/whatwg/fetch/issues/1338 -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/599#issuecomment-2304671314 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/issues/599/2304671314@github.com>
Received on Thursday, 22 August 2024 13:26:17 UTC