- From: Peter H. Jin <notifications@github.com>
- Date: Tue, 21 Jan 2025 22:15:49 -0800
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/issues/577/2606385148@github.com>
> [@PHJArea217](https://github.com/PHJArea217) > > > [@randomstuff](https://github.com/randomstuff)'s "soxidier" tool maps domain names to unix domain sockets, such that if the user went to http://name.username.users.uds.localhost/foo/bar then it would be effectively connecting to e.g. /home/username/name, and making the request GET /foo/bar HTTP/1.1, with the possibility of using symlinks to redirect connections to other sockets outside of this pattern. > > Well, fine. But, as I said, that is not an RFC 3986 compliant URI. > > A list of IANA recognized top-level Domain Names can be found at: https://data.iana.org/TLD/tlds-alpha-by-domain.txt "localhost" is not on that list. > > Of course, you could configure your own local dns server to resolve "localhost" to some server on your local network, but that is not a general solution. It would be useless for accessing a host on the global Internet. > > To be clear, with respect to the solution which I have proposed, the pros and cons come down to a question of a single ":" character. Seriously - the placement of a single ":" character in the context of the entire RFC 3986. Section 3.2.2: > This specification does not mandate a particular registered name > lookup technology and therefore does not restrict the syntax of reg- > name beyond what is necessary for interoperability. Instead, it > delegates the issue of registered name syntax conformance to the > operating system of each application performing URI resolution, and > that operating system decides what it will allow for the purpose of > host identification. A URI resolution implementation might use DNS, > host tables, yellow pages, NetInfo, WINS, or any other system for > lookup of registered names. However, a globally scoped naming > system, such as DNS fully qualified domain names, is necessary for > URIs intended to have global scope. URI producers should use names > that conform to the DNS syntax, even when use of DNS is not > immediately apparent, and should limit these names to no more than > 255 characters in length. Unix domain socket URIs are not intended to have global scope, due to the local nature of Unix domain sockets. Sure, you might not be able to connect to sockets whose name contains a colon, but one could place a symlink at a file path which does not contain a colon, and point it to a file path that does contain a colon. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/577#issuecomment-2606385148 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/issues/577/2606385148@github.com>
Received on Wednesday, 22 January 2025 06:15:53 UTC