JDK-6227551 : REGRESSION: Loading applet fails if URL contains %7E
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 5.0,5.0u2
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt,windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2005-02-10
  • Updated: 2014-02-27
  • Resolved: 2005-03-03
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
5.0u3 b05Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]

A DESCRIPTION OF THE PROBLEM :
Applet fails to load if URL contains %7E. For example:
http://scv.bu.edu/%7Eaarondf/java/quintzee.html

When '%7E' is replaced with '~', the applet does load. I.e.:
http://scv.bu.edu/~aarondf/java/quintzee.html

It's consistent with the following three browsers that I've tried: Mozilla 1.7.5, Firefox 1.0 & Internet Explorer 6.

When you open the Java console in your browser, set trace level to 2 (basic, net), you will see that the plugin tries to connect to http://scv.bu.edu/%25257Eaarondf/java/Quintzee.class.

  Interestingly, the appletviewer of j2sdk1.5.0 has no problem with the '%7E' URL. Therefore, it seems the problem is related to the plugin only.

I have not tested it, but I'm wondering if a URL contains another URL escaped character (i.e. of the form %xx, e.g. %20), will the plugin fail to load it too?

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Open the Java console in your browser, and set trace level to 2 (basic, net).
Then visit
http://scv.bu.edu/%7Eaarondf/java/quintzee.html
The browser shows the broken applet icon, and the console displays that it cannot load the applet class file (see Error Messages section).

Next, if you visit
http://scv.bu.edu/~aarondf/java/quintzee.html
the applet loads and plays just fine.



EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The applet should load and display.
ACTUAL -
The browser shows the broken applet icon, and the console displays that it cannot load the applet class file (see Error Messages section).

ERROR MESSAGES/STACK TRACES THAT OCCUR :
[From Java console with trace level set to 2: basic, net]
network: Connecting http://scv.bu.edu/%25257Eaarondf/java/Quintzee.class with proxy=DIRECT
network: Connecting http://scv.bu.edu/%25257Eaarondf/java/Quintzee/class.class with proxy=DIRECT
load: class Quintzee.class not found.
java.lang.ClassNotFoundException: Quintzee.class
	at sun.applet.AppletClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.applet.AppletClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.applet.AppletClassLoader.loadCode(Unknown Source)
	at sun.applet.AppletPanel.createApplet(Unknown Source)
	at sun.plugin.AppletViewer.createApplet(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
	at sun.applet.AppletClassLoader.getBytes(Unknown Source)
	at sun.applet.AppletClassLoader.access$100(Unknown Source)
	at sun.applet.AppletClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 10 more
basic: Exception: java.lang.ClassNotFoundException: Quintzee.class

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
http://scv.bu.edu/%7Eaarondf/java/quintzee.html
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Replace '%7E' by '~' in the URL. However, replacing a URL escaped character (%xx) by its real character is not always possible in a URL.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.
###@###.### 2005-2-10 00:13:38 GMT


Backported the networking fix for 6181108 from mustang to 1.5.0_04 & tested.
That does fix this issue also. After communication with Networking team, assigning this & related bug 6227551 to Edward.Wang. 

Edward Wang wrote:
> Hi Rajani,
> 
> I'm the owner of this fix in Mustang. It's for CR6181108
>     http://monaco.sfbay/detail.jsp?cr=6181108
> It should fix 6219199  &  6227551, too. They're duplicated.
> 
> Sharon,
> I can take care of these 2 bugs. It's about backporting them from 
> Mustang to Tiger, just like Rajani did.
> 
> Regards,
> Edward
###@###.### 2005-2-22 15:20:29 GMT

Comments
EVALUATION Backport the fix for 6181108, which is the root cause of this one. ###@###.### 2005-2-28 02:08:06 GMT
28-02-2005