- Subject: getLocalHost and localhost fail
- From: Claude Vittoria <claude.vittoria@xxxxxxxxx>
- Date: Tue, 15 Sep 2009 12:21:15 +0200
Hi,
I get an issue with getLocalHost. I trace and I see getLocalHostname
return localhost and after the call at getbyname, getallbyname then
getHostbyName !?! and fails. I see with strace a request to the
nameserver ?!?
My question why the nameserver is called to resolv localhost ?
Why in InetAddress.java l.579 the test:
if (hostname == null || hostname.length() == 0)
is not
if (hostname == null || hostname.length() == 0 || "locahost".equals(hostname))
Thanks for your light.
Cheers,
Claude
[Linux Kernel]
[Linux Cryptography]
[Fedora]
[Fedora Directory]
[Red Hat Development]