Closed Bug 358630 Opened 19 years ago Closed 17 years ago

[mac] nsIDNSService::resolve not working

Categories

(Core :: Networking, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: miken32, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 The following JS code generates an error on Mac; no problems in Windows: var dns = Components.classes['@mozilla.org/network/dns-service;1'].getService(Components.interfaces.nsIDNSService); alert(dns.resolve(dns.myHostName, dns.RESOLVE_BYPASS_CACHE | dns.RESOLVE_CANONICAL_NAME)); Reproducible: Always
I should mention, the error is: Error: Component returned failure code: 0x804b001e [nsIDNSService.resolve] = <unknown>
that's the error for an unknown host. what's dns.myHostName?
It's the hostname of the local machine ('ibook4' in this case); I'm trying to get the IP address of the machine.
can other apps resolve that hostname?
Hmm, nslookup won't work with it. I think I see where you're going with this: the resolve function just calls the OS's GetHostByName function, and if that doesn't resolve the name I'm out of luck. I'm the author of the extension in the URL field; someone just told me it's not working on a Mac, so I filed this bug. Surely there must be some way for *nix browsers to get the local IP address?
If what I said in comment 5 is confirmed, I'll resolve this as invalid.
assuming that comment 5 was correct; marking invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.