Firefox PAC IsInNet [bugzilla.mozilla.org]
I currently spend most of my time in a corporate network where I have to use a proxy auto-config (.pac) file.
For some time I have been bothered by Firefox 1.0 and 1.5 shortly freezing for no apparent reason. I tried to disable all extensions, removed the Flash and Java plugins, but to no avail. Today, I accessed a domain with a defunct DNS server and Firefox froze for more than just a short moment, giving me an opportunity to track down the problem.
It turns out that this is a known issue, described in Bugzilla #208287. The .pac file I use contains something like this:
for (i = 0; i < cDirectIPs; i += 2)
if (isInNet(host, DirectIPs[i], DirectIPs[i + 1]))
return "DIRECT";
}
return "PROXY 10.0.0.1:3128;";
isInNet(host, NET1, NET2) checks if the host name from the HTTP request is part of numerical subnet 1 or subnet 2. And this is done 16 times for every single HTTP request in this .pac file.
Even one call to isInNet() can be fatal for Firefox. If the DNS server for the host name is not reachable, the call will only time out after a couple of seconds. And during this time, Firefox will be completely unresponsive. No display updates, no response to keyboard or mouse input.
Bottom line: isInNet() should not be used with Firefox, until someone works on Bugzilla #208287.
10:14, 03 Feb 2006 by Carsten Clasohm Permalink | Comments (0)
| February 2006 | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
Request notifications