Closed Bug 95327 Opened 24 years ago Closed 24 years ago

PAC: isInNet() does not work

Categories

(Core :: Networking, defect)

x86
Windows NT
defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 79057

People

(Reporter: miikl, Assigned: neeti)

References

Details

My ProxyAutoConfig script does not work. When I set my PAC, and enter a URL (such as http://www.slashdot.org/, the status bar shows "Connecting to www.slashdot.org", I wait for over 30 seconds, then get a dialog box "The connection was refused when attempting to contact www.slashdot.org.". When I configure the browser to use a manually configured PAC, connecting to this and other sites works correctly, and the PAC works fine in Netscape Navigator 4 and Internet Explorer 5. If I open the JavaScript Console, I see this error: ----- dnsResolve is not defined http://server.domain.com/proxy/proxy.pac Line: 19 ----- (where server.domain.com is the host where the PAC is hosted) My PAC is of the form: ----- function FindProxyForURL(url, host) { if // if no domain specified, try direct ( isPlainHostName(host) ) return "DIRECT"; else if // if URL is in local domain, try direct ( dnsDomainIs(host, ".domain.com") || isInNet(host, "192.168.75.0", "255.255.255.0") ) return "DIRECT"; else if // if URL is in company domain, try company proxy ( dnsDomainIs(host, ".company.com") || isInNet(host, "192.168.0.0", "255.255.0.0") || isInNet(host, "x.x.x.x", "255.255.255.0") || isInNet(host, "x.x.x.x", "255.255.255.0") ) return "PROXY proxy.company.com:3128"; else // for everything else, use local proxy return "PROXY proxy.domain.com:3128"; } ----- The proxy servers are running squid on port 3128. I believe the PAC is correct according to <URL:http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html>. It would seem as if dnsDomainIs() relies on dnsResolve(), and dnsResolve() is not yet implemented in Mozilla. I have experienced this in all recent Mozilla builds I have tried, including 0.7 .. 0.9.3 and in Netscape 6.0/6.1.
dnsResolve() was completely broken (see bug 79057), and this would prevent your script from executing. However, it should be in recent trunk builds. I thought that this made it in time for 0.9.3 as well, though I was out of town at the time. Investigating...
QA Contact: benc → pacqa
Correcting summary -- dnsDomainIs() doesn't depend on dnsResolve(), but isInNet() does.
Summary: PAC: dnsDomainIs() does not work → PAC: isInNet() does not work
Hmm, I just tried out a simple PAC relying on dnsResolve/isInNet with 0.9.3/Linux, and didn't have any issues. I think basic is on a windows platform, maybe he can verify this as well. miikl@yahoo.com.au, would you mind trying this with a recent nightly build? Thanks.
Does your PAC really use x.x.x.x for its pattern?
What is the build ID of the mozilla 0.9.3 build? Which build did you download? installer? zip? stub-installer?
I redownloaded the Windows installer build of Mozilla 0.9.3 (build 2001080110), and my PAC seems to be working fine. I am not sure which version of 0.9.3 I was using previously. Perhaps I was mistaken about the bug occurring in 0.9.3. In this case, the bug is a duplicate of 79057, which was resolved in 0.9.3. Sorry for the inconvenience. *** This bug has been marked as a duplicate of 79057 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
verifying per reporter's comment
Status: RESOLVED → VERIFIED
Blocks: 96708
You need to log in before you can comment on or make changes to this bug.