- From: TechnicallyWeb3 <notifications@github.com>
- Date: Sat, 04 Oct 2025 10:01:57 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/issues/883/3368416143@github.com>
TechnicallyWeb3 left a comment (whatwg/url#883) > My suggestion would just be to use `wttp://` if your new protocol's userinfo, hostname and port matches the same restrictions that the regular URL standard applies for things like http. The ONLY thing that doesn't fit is chain IDs in the port number can be larger than 16 bits. From my research there are no limits to port numbers other than they need to be a "digit" in URI standards(RFC 3986). It's a TCP/IP limit and doesn't belong in the URI/URL standard. > Otherwise drop the // and use `wttp:` instead ... > That way you can parse it any way you want, and any browser/app parsers won't mess with it. The problem is parsing URLs like this: `wttp:tw3.eth:11155111/` Using the URL libraries that comply with WHATWG. My port number disappears since it's considered invalid. The output becomes: `wttp:tw3.eth/` Not to mention :// denotes URI/URLs which this is. I don't think that : (without //) is appropriate since it usually denotes resources that never change. > I don't think it's a good idea to change the URL standard just because some protocol wants to put other things where the port normally goes. Could you point me to the RFC or standard for URI or URL that specifies a 16-bit port number? My problem is that WHATWG enforces something that I believe isn't part of the actual URI/URL RFCs and goes off standard to enforce the port number restriction from TCP/IP. Either that or we need to update/obsolete RFC 3986 in favour of a URI RFC that is more complete concerning 16-bit port number restrictions or we need to relax WHATWG to match actual URI standards. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/883#issuecomment-3368416143 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/issues/883/3368416143@github.com>
Received on Saturday, 4 October 2025 17:02:00 UTC