- From: The Moisrex <notifications@github.com>
- Date: Fri, 03 Oct 2025 21:44:47 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/issues/883/3367893674@github.com>
the-moisrex left a comment (whatwg/url#883) > The different symbols such as @ and : actually help with parsing! It makes it significantly faster and more efficient. That's flat out incorrect. In fact, the opposite happens. Th > ... I'm not here to tell developers how to build their apps. Yes, we are. That's what standardization is. > Take the following example: > Domain: blog.my-little-pony.xyz > User: site-admin.1 > Port: 8080 > Path: /help Your using specialized protocols like http here as an example, and not a custom protocol which has less restrictions in WHATWG URL specs; this confuses me; are you designing a new protocol or not? I assumed you were, and your `userSignature` and `contactAddress` and what not are hex encoded always based on your examples. You can always encode things (even with punycode) if you need dots and dashes in my proposed solution; but I'm sure we can come up with other solutions that you don't even need to do that but that depends on your needs. > Implementers wouldn't have to implement this to be above uint16.max they could use any unsigned integer. If we expand the port number's underlying storage type, to include chain IDs, what's stopping from someone else coming and asking to expand it to include even bigger numbers? What's the stopping point? You can simply Hex-encode the chain ID and use it as a sub-domain, or in an encoded string among other things, or use UUID somehow (depends) or so many other solutions (assuming if we're talking about a new protocol that still complies with URL specs). > I don't mind using my "wide URL" (wURL) utility which extends the URL class (using WHATWG) to accept port strings if my proposal doesn't pan out. I don't recommend doing that. URLs are not something only you implement, it's something others have to implement as well. Unless you're implementing both sides that use the URL, then it's not a good idea to do this. --- Other solution is this: In punycode encoded strings and toASCII algorithm and in the [Validity Criteria](https://www.unicode.org/reports/tr46/#Validity_Criteria), you can't use domain labels that start or end with `-` or their 3rd and 4th code points are `-` when "strictness" is enabled. (Think about `xn--`) You can use this to your benefit. For example, you can hex-encode the chain id, user signature, and what not, with different prefixes. For example: - `ci--` for Chain ID - `us--` for user signature - `ua--` for user addresses - And so on... This means, you can be sure that people can't use these as their domains, but you can use them for other things to carry information. Or you can use the starting and ending with hyphen rule. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/883#issuecomment-3367893674 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/issues/883/3367893674@github.com>
Received on Saturday, 4 October 2025 04:44:51 UTC