Re: localhost

Roy T. Fielding <fielding@gbiv.com> wrote:

 > Fixed.

I'm not sure I know how to interpret the new text:

 > If "localhost" is not determined by a host name lookup, then it should
 > be interpreted to mean the machine on which the URI is being resolved.

Does this mean:

1) Either perform a host name lookup on "localhost" or interpret it to
mean the machine you're running on, your choice.

or

2) Perform a host name lookup on "localhost".  If you don't get an
answer, then interpret it to mean the machine you're running on.

or

3) Perform a host name lookup on "localhost" or don't, your choice.
If you don't get an answer (possibly because you didn't perform the
lookup), then interpret it to mean the machine you're running on.

or

4) If the reg_name is supposed to be a host name, then treat "localhost"
like any other host name (that is, look it up).  Otherwise interpret
"localhost" to mean the machine you're running on.

In any case, are you sure you want to leave room for more than one
outcome?  RFC-1738 left no room for doubt; localhost was required to
refer to the machine you're running on (but only for file: URIs).  That
implied that you could legitimately use the host name resolver for
localhost only if you could depend on your resolver to map localhost to
the machine you're running on.

Maybe the best we can do is say something like:

     "localhost" customarily refers to the machine on which it is
     interpreted, but this has not yet been formally standardized.
     All reg-name registries are encouraged to support this custom.
     Individual URI schemes can require support for this custom.

AMC
http://www.nicemice.net/amc/

Received on Monday, 16 February 2004 09:20:28 UTC