W3C home > Mailing lists > Public > uri@w3.org > February 2004

localhost

From: Adam M. Costello BOGUS address, see signature <BOGUS@BOGUS.nicemice.net>
Date: Sun, 15 Feb 2004 09:51:41 -0500
Message-Id: <4.2.0.58.J.20040215095133.058a9110@localhost>
To: uri@w3.org




I notice that the current draft of rfc2396bis contains some formal uses
of the name "localhost", but neither states what this is supposed to
mean nor cites any definition.

RFC-1738 gave its own semantics for "localhost" in file: URLs:

    As a special case, <host> can be the string "localhost" or the empty
    string; this is interpreted as `the machine from which the URL is
    being interpreted'.

[Curiously, the grammar introduces an ambiguity:

    fileurl = "file://" [ host | "localhost" ] "/" fpath
    host = hostname | hostnumber

Given the URL file://localhost/, the string "localhost" can match either
the hostname token or the "localhost" token.  Was the intention to imply
that "localhost" is not a host name?]

RFC-2606 has this to say:

     The ".localhost" TLD has traditionally been statically defined in
     host DNS implementations as having an A record pointing to the loop
     back IP address and is reserved for such use.  Any other use would
     conflict with widely deployed code which assumes this use.

This gives the impression that "localhost" is not standard, but is a
widespread customary host name that maps to an IP loopback address.
RFC-2606 reserves the host name (and the entire TLD) "localhost" for
a particular usage, but does not actually require an internet host
to support that usage.  In theory, "localhost" is permitted to be an
unknown host name, unless I've simply failed to find the relevant
requirement.

If rfc2396bis is going to formalize the usage of "localhost" in URIs,
perhaps it should either define the semantics of "localhost" in the
context of URIs, or it should cite a standard for the host name
"localhost".  I don't think such a standard exists to be cited, but
maybe we could look into getting one created.

There have been times when I wondered if I could legitimately assume the
existence of "localhost" on all internet hosts, and been dismayed at how
little assurance was to be found in the IETF standards.

AMC
http://www.nicemice.net/amc/
Received on Sunday, 15 February 2004 09:52:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:07 UTC