Boris Zbarsky wrote:
> Michael Vincent van Rantwijk, MultiZilla wrote:
>> What exactly is this supposed to do:
>>
>> var currentHost = "140.211.166.81"; // example code
>> nsIDNSService.resolve(currentHost, 2).canonicalName;
> 
> nsHostResolver::ResolveHost has:
> 
> 450             // try parsing the host name as an IP address literal to 
> short
> 451             // circuit full host resolution.  (this is necessary on 
> some
> 452             // platforms like Win9x.  see bug 219376 for more details.)
> 
> That might be what you're hitting here.  It looks like in this case 
> nothing will actually get filled in in the DNS record other than the IP 
> address.
> 
> -Boris

But this happens on Windows XP and Vista, and Windows 9x is no longer 
supported, right?  FYI: I'm not even on windows, but I do use a spoofed 
HTTP UA.

Important new features, like an improved phishing detector for both mail 
and the browser now simply fail because of this bug.

Also, the JS component observes "http-on-modify-request" and QI's into 
nsIRequest.name because nsIHttpChannel.referrer can be blocked or null, 
but look at that comment in the IDL; "Often this is the URI of the 
request." so how else do I get to the URI from nsIHttpChannel?

Next problem: How do I get to either the document, docShell, window or 
tab which initiated this request/channel?

There should only be one component changing the HTTP requests, that I 
read in the IDL, so how do I filter stuff out? For example, we use 
something like:

if (/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(currentHost)) {

but isn't there anything else that A) works faster and B) is ipv6 
compatible that I can call from some interface?

Thank you for your help,

-- 
Michael Vincent van Rantwijk
- MultiZilla Project Team Lead
- XUL Boot Camp Staff member (ActiveState Training Partner)
- iPhone Application Developer

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to