United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-5067959 Plugin fails to load proxy.pac file when IE uses *.ins file
JDK-5067959 : Plugin fails to load proxy.pac file when IE uses *.ins file

Details
Type:
Bug
Submit Date:
2004-06-24
Status:
Resolved
Updated Date:
2004-12-09
Project Name:
JDK
Resolved Date:
2004-09-15
Component:
deploy
OS:
windows_2000
Sub-Component:
plugin
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.2_06,6
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

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
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
                                     
2004-08-02
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mustang

FIXED IN:
mustang

INTEGRATED IN:
mustang


                                     
2004-09-15
SUGGESTED FIX

See webrev for the suggested fix.
http://javaweb.sfbay/~xl116366/webrev/5067959/


###@###.### 2004-12-09 18:11:57 GMT
                                     
2004-12-09



Hardware and Software, Engineered to Work Together