pg has asked for the wisdom of the Perl Monks concerning the following question:
Update:
My appreciation goes to idsfa and zengargoyle. I appreciate their research and their scientific and serious way of thinking.
It turned out that Java and Perl does the same, see idsfa's post for detail. Also see posts from both of them for some useful RFC's.
Original:
I have used IO::Socket::INET for a long time, but last week I suddenly noticed something: Perl always resolves localhost to loopback 127.0.0.1, which is the least expected to me.
When my computer is connected to a network, I expect localhost being resolved to my IP address assigned (in the simplest case, let's don't talk about what if my computer has multiple IP assigned), not the loopback. That is true to quite a few of other languages.
Java does it in a very interesting way, it resolves localhost to your IP address, but when you run from applet, it resolves to loopback for security reason (which is quite stupid, as I have a way to break this anyway.)
Any way, what is the reasoning behind Perl? or just a bug?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Does Perl always resolve localhost to loopback?
by idsfa (Vicar) on Oct 18, 2003 at 02:03 UTC | |
by pg (Canon) on Oct 18, 2003 at 02:25 UTC | |
|
Re: Does Perl always resolve localhost to loopback?
by mpeppler (Vicar) on Oct 18, 2003 at 00:02 UTC | |
by pg (Canon) on Oct 18, 2003 at 01:58 UTC | |
|
Re: Does Perl always resolve localhost to loopback?
by sauoq (Abbot) on Oct 18, 2003 at 00:22 UTC | |
| |
|
Re: Does Perl always resolve localhost to loopback?
by zengargoyle (Deacon) on Oct 18, 2003 at 00:09 UTC | |
|
Re: Does Perl always resolve localhost to loopback?
by Anonymous Monk on Oct 18, 2003 at 02:01 UTC |