JDK-5067959 : Plugin fails to load proxy.pac file when IE uses *.ins file
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.2_06,6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-06-24
  • Updated: 2004-12-09
  • Resolved: 2004-09-15
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
1.4.2_09Fixed 6 mustangFixed
Description
Name: jl125535			Date: 06/24/2004


FULL PRODUCT VERSION :
Version 1.5.0-beta2 (build 1.5.0-beta2-b51)

ADDITIONAL OS VERSION INFORMATION :
Windows 2000 and most likely all windows versions.

A DESCRIPTION OF THE PROBLEM :
When Internet Explorer is configured to use an Internet Settings file (*.INS) as automatic configuration file Java Plug-in loads this file without problems but follows wrong parameter to load proxy pac configuration file.

In our case this *.INS file is loaded with FTP and contains following two lines under [URL] section. Hostname and path of course are real but here as pseudo examples.

[URL]
AutoConfig=1
AutoConfigURL=ftp://<hostname>/<path>/imeurope.ins
AutoConfigJSURL=http://proxyconf/proxy.pac

Java Plug-in follows AutoConfigURL from *.INS file and it points
back to the same *.INS file and so fails to load proxy configuration.

I feel that Java Plug-in should follow URL given in *.INS file parameter
AutoConfigJSURL which always should point to a proxy configuration file.

See below Microsoft page for description of these parameters and their intended purpose.

http://www.microsoft.com/resources/documentation/WindowsServ/2003/all/techref/en-us/Default.asp?url=/resources/documentation/windowsServ/2003/all/techref/en-us/w2k3tr_u_url.asp



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
0.
Your computer needs to have proxy to access Internet.

1.
Configure IE to use INS file as automatic configuration file.

2.
Put into *.INS file at least following lines.

[URL]
AutoConfig=1
AutoDetect=0
AutoConfigURL=<ftp |http>://<hostname>/<path>/<filename1>.ins
AutoConfigJSURL=http://<hostname>/<filename2>.pac

Where filename1 points to the *.INS file itself and filename2 points to a valid Javascript proxy configuration file (*.pac file).

3.
Use a applet that loads something from Internet and so needs to access
Interner through proxy.

You could use for example this Java applet (not ours). It will fail
because it cannot load Java classes and this is beause of NoRouteToHostException.

http://www.radinks.com/upload/applet.php

4.
Connection to Internet fails.


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Java Applet would connect to Internet just fine through proper proxy.
ACTUAL -
Java Applet fails to connect to Internet and gives NoRouteToHostException.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.net.NoRouteToHostException: No route to host: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(Unknown Source)
	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at sun.net.NetworkClient.doConnect(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.http.HttpClient.openServer(Unknown Source)
	at sun.net.www.http.HttpClient.<init>(Unknown Source)
	at sun.net.www.http.HttpClient.New(Unknown Source)
	at sun.net.www.http.HttpClient.New(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
	at com.<company>.nds.ddi.download.frontend.o.a(o.java)
	at com.<company>.nds.ddi.download.frontend.l.a(l.java)
	at com.<company>.nds.ddi.download.frontend.n.b(n.java)
	at com.<company>.nds.ddi.download.frontend.n.a(n.java)
	at com.<company>.nds.ddi.download.frontend.n.a(n.java)
	at com.<company>.nds.ddi.download.frontend.nb.l(nb.java)
	at com.<company>.nds.ddi.download.frontend.h.run(h.java)
	at java.lang.Thread.run(Unknown Source)


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
You need to configure Java Plug-in Control Panel proxy settings so that 'Use automatic proxy configuration script' is used and this points to a proxy pac file (not *.INS file).

Our company has tens of thousands of employees and to explain this
workaround to all of them is not obviously very practical.
(Incident Review ID: 281280) 
======================================================================

Comments
SUGGESTED FIX See webrev for the suggested fix. http://javaweb.sfbay/~xl116366/webrev/5067959/ ###@###.### 2004-12-09 18:11:57 GMT
09-12-2004

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang FIXED IN: mustang INTEGRATED IN: mustang
15-09-2004

EVALUATION I can reproduce the issue. Since the submitter has a workaround and it is very tight to get any fix in Tiger, I commit it to Mustang unless the customer escallate it, in which case, we can fix it in update release. ###@###.### 2004-07-01 Root cause of this bug is "AbstractAutoProxyHandler.getAutoConfigURLFromINS/getJSFileFromURL" does not conside the ftp url case. Using HttpURLConnection for a FTP url won't work. So the fix is to call url.openConnection explicitly for ftp url. ###@###.### 2004-08-02
02-08-2004