JDK-6346688 : JAVA WebStart is NOT handling PAC-file (Proxy Auto Config) using dnsDomainIs() correctly
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2005-11-07
  • Updated: 2010-05-05
  • Resolved: 2006-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u7Fixed 6 b70Fixed
Related Reports
Duplicate :  
Description
JAVA WebStart is NOT handling PAC-file (Proxy Auto Config)
Failing product name .......: Java WebStart v.1.5 (latest version)
Sytem type (E420R/..) ......:
Operating system ...........: Windows XP / Windows 2000 and InterNet Explorer v.6.x
Short problem description ..: Java WebStart and Proxy Autoconfiguration not working

Detailed problem description:

Customer is currently trying to roll out a solution based on Java WebStart. What Customer is trying to do is to load a Jar file from a server on the Internet. 
The customer uses proxy servers to restrict the access to the net.However we have managed to get an exception in one of the proxies to our server so we can use it without proxy autentication. Our servers are currently running apache with some other applications. This works in their Internet Explorer where they use a  Proxy setup. It is a script called a "pac" script. (Proxy Auto Config). Which tells the client which proxy to go through for a specific adress.

When The Customer  try to enter this information in "Control Panel -> Java" we get no success, nor does it seem to work with the "Use browser setting". The only way we can make it work is to enter "our" specific proxy manually. This however, is not an option in the production environment, as they use Java for other things aswell.

So, Customer question is, are they are doing something wrong, or have they might stumbled across a bug? PAC File that is NOT working:

var proxy_set = "PROXY proxyA.company.com:80; PROXY proxyF.company.com:80";
StandardProxy=true ;
function FindProxyForURL(url, host) {

if( host == "localhost" ) {

        return "DIRECT";
}
// The following sites are routed to proxyeu4, where exceptions are stored
if (
       //Rule 122 - CPSS00002131772
                dnsDomainIs(host, "www.webportal.nu") ||
        //Rule 187 - CPSS00002185708
                dnsDomainIs(host, "146.192.73.3") ||
                dnsDomainIs(host, "146.192.73.1") ||
                dnsDomainIs(host, "webtoprint.yara.com") ||
                dnsDomainIs(host, "www.webtoprint.yara.com") ||
                dnsDomainIs(host, "mediabase.edbasa.com") ||
                dnsDomainIs(host, "web2print.edbasa.com") ||
                dnsDomainIs(host, ".citicorp.com")
) {
      return "PROXY proxyz.company.com:80";
}
if (dnsDomainIs(host, ".company1.com")) {
        return "DIRECT";
}
if (dnsDomainIs(host, ".company2.com")) {
         return "DIRECT";
}
        return proxy_set ;
}

Comments
EVALUATION Now that we have additional information including trace output, I think we have isolated and fixed the problem. the problem is in javascript function dnsDomainIs(host, domain) passed to ie javascript engine. Function fails for host == domain. For example "jdeploy.east.sun.com" returns true for domain ".east.sun.com" and for ".sun.com" but not for "jdeploy.east.sun.com". will test out fix in mustang and propose for backport to 5.0 u7.
14-12-2005

WORK AROUND one possible work around for this customer would be to get an exception also for "http://java.sun.com", so the pac file would return the same proxy for that address as for the server that the jnlp application is hosted on.
08-11-2005

EVALUATION Java Web Start uses java.net.ProxySelector to dynamically select proxys based on the url, and that class was first added to java.net in j2se 1.5.0, so it is not possible to use dynamic proxys when running in java 1.4. (further customer communication indicated they were using 1.4 jre). When a proxy pac is configured, and an application uses an earlier jre, webstart must use static proxys, in this case it uses the proxy the pac file would return for a connection to "http://java.sun.com".
08-11-2005