Live data from Hacker News

Internet Draft: Let 'localhost' be localhost

tools.ietf.org

91–100 of 179 posts

Re: Internet Draft: Let 'localhost' be localhost

#91
post #5

Earlier quoted context omitted.

I don't think (?) I've ever made this typo. How many hits do you get? (I feel like "ocalhost", "locahost", or "localhos" would be more common typos.)

localhost would be a good name for a bar in SF.

Right next to a Foo Bar

Re: Internet Draft: Let 'localhost' be localhost

#92

First, the lack of confidence that "localhost" actually resolves to the loopback interface encourages application developers to hard-code IP addresses like "127.0.0.1" in order to obtain certainty regarding routing. This causes problems in the transition from IPv4 to IPv6 (see problem 8 in [draft-ietf-sunset4-gapanalysis]). That does remind me of the times I was dealing with weird connection issues in some critical s…

> and that breaks everything If you're on a POSIX system, I'd argue that this is a bug in the client. Typically, the client should call getaddrinfo(3); as part of that, the application would either specify directly that it's only interested in AF_INET results, or just filter out non-AF_INET results. (Further, if you support IPv6 in the client, and thus request such results from getaddrinfo, you should skip to the nex…

Agreed that it's a bug in the client, but these bugs are going to be ever-present in the transition to IPv6.

Re: Internet Draft: Let 'localhost' be localhost

#93

The domain "localhost.", and any names falling within ".localhost.", are known as "localhost names". Localhost names are special in the following ways […] Is this not implemented on macOS or am I just misunderstanding? ~ ping test.localhost ping: cannot resolve test.localhost: Unknown host ~ ping localhost.test ping: cannot resolve localhost.test: Unknown host

To clarify a bit further than what the other comments said (abc.localhost. isn't implemented on macOS):

The RFC draft is talking about domains ending in ".localhost.", not any domain containing ".localhost." (so abc.localhost.example.com wouldn't be localhost).

All domains have to end with a period, or they're not fully qualified. "example.com" could mean "example.com.my.domain." if whatever you're using uses "my.domain." as the root. But "example.com." is always "example.com."

Nowadays that feature isn't used very often, as the root of domains not ending in a period is usually assumed to be in the root zone.

Re: Internet Draft: Let 'localhost' be localhost

#94
post #2

If this doesn't happen or takes too long, there's always lacolhost.com and *.lacolhost.com. I own this domain, have registered it out until 2026 and vow that the domain and all subdomains will always redirect to localhost. It's easy to type and easy to remember and should always do a good job of expressing intent of usage.

You're amazing. I hope you're given more power than you already have.

Re: Internet Draft: Let 'localhost' be localhost

#95
post #31
post #20

Earlier quoted context omitted.

The anagram alcolhost would be a nice one too

"St Alcohol" and "Alcohol St" are also good anagrams

Did you think of that on your own? God I feel dumb. (I like being made to feel dumb) I googled it and didn't get that answer. I guess remembering ST can be a street or saint is a good rule.

Re: Internet Draft: Let 'localhost' be localhost

#96
post #89

At least on the OS I use, which is more IPv6 ready than most, /etc/hosts solves this "uncertainty" problem. I have found that failing to include a localhost entry in the HOSTS file can lead to some strange behavior. If there are "computers" out there that have no /etc/hosts or deny the computer's owner access to it, then maybe it might be time for an Internet Draft from Joe User. There should always be a mechanism fo…

I remember in the late 90s running into a "mysterious" problem where www.hotmail.com would fail to load, but hotmail.com (without www.) worked just fine. Spent the better part of a year just remembering to not type "www." until one day they made the domain redirect to the canonical name (breaking both). After asking around a bit, someone showed me where the Windows equivalent of /etc/hosts was, and lo-and-behold, the…

/etc/hosts also seems to work on android https://android.stackexchange.com/a/110483

Re: Internet Draft: Let 'localhost' be localhost

#97

First, the lack of confidence that "localhost" actually resolves to the loopback interface encourages application developers to hard-code IP addresses like "127.0.0.1" in order to obtain certainty regarding routing. This causes problems in the transition from IPv4 to IPv6 (see problem 8 in [draft-ietf-sunset4-gapanalysis]). That does remind me of the times I was dealing with weird connection issues in some critical s…

Ideally, a server binding to "localhost" should create a listening socket for each of its IP addresses (e.g. 127.0.0.1 and ::1), and a client connecting to "localhost" should try each IP address in order, until one succeeds.

But a lot of standard libraries (including parts of Java and Go) get this wrong, and pick exactly one IP address arbitrarily. When you combine a buggy client with a buggy server, and their preferences for IPv4/IPv6 disagree, then all hell breaks loose.

These are the open bugs I'm aware of:

https://bugs.openjdk.java.net/browse/JDK-8170568

https://github.com/golang/go/issues/9334

Re: Internet Draft: Let 'localhost' be localhost

#99
I would very much like to see this draft extended to cover SRV lookup as well.

Right now, section 3 of this draft would prohibit all SRV queries for localhost, which may hinder development and deployment of a SRV based application. That's an immediate problem.

But not only are there existing applications to which it is immediately applicable - it is a design error in HTTP that plain address records are used for resolution. One day this will be corrected, in which case measures like this should continue to apply.

Re: Internet Draft: Let 'localhost' be localhost

#100
post #84

Earlier quoted context omitted.

> and that breaks everything If you're on a POSIX system, I'd argue that this is a bug in the client. Typically, the client should call getaddrinfo(3); as part of that, the application would either specify directly that it's only interested in AF_INET results, or just filter out non-AF_INET results. (Further, if you support IPv6 in the client, and thus request such results from getaddrinfo, you should skip to the nex…

I agree about getaddrinfo(). Applications should have specified AF_INET to gethostbyname() and then when updating to getaddrinfo(), handle ipv6 correctly or skip it. The IPv4-mapped IPv6 addresses thing is a terrible idea that ends up turned off everywhere it makes a difference. Like all of these "transition" ideas, it tries to help, but it just hurts by causing admins/ops/devs to just make sure ipv6 is off everywher…

Is it fair to say IPv6 has been generally a failure? Or is it too early for that?
Post reply on HN