-
Backport
-
Resolution: Fixed
-
P3
-
7
-
b12
-
Verified
FULL PRODUCT VERSION :
1.7.0_06
1.7.0_07
ADDITIONAL OS VERSION INFORMATION :
Windows Vista
Windows 7
Windows 8
A DESCRIPTION OF THE PROBLEM :
If there is a cached version of a requested jar file for an applet, the java plugin makes a request to the web server for a jar.pack.gz file, which will not exist in most cases. If the web server does not respond Status-not-found but Status-multiple-choices, the plugin does not start the java applet at all.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please consider the following java applet for example:
http://www.schulphysik.de/java/physlet/applets/truckrace.html
If one loads the java applet for the first time, everything works fine.
And this is the network recording:
HTTP:Request, GET /java/physlet/classes/Animator4_.jar
HTTP:Response, HTTP/1.1, Status: Ok
Now, the jar file is in the cache.
Now, close the browser and try to open it again.
Now, the applet does not start.
This is the network recording:
GET /java/physlet/classes/Animator4_.jar.pack.gz
HTTP:Response, HTTP/1.1, Status: Multiple choices
For some reason, the plugin now tries to request a jar.pack.gz file, which does not exist, instead of the jar file. Now, if the web server is configered not to respond with a Status-not-found but with a Status-multiple-choices, then the java plugin does neither load the correct jar file nor uses the cached version.
If, however, the webserver would respond with a Status-not-found then the plugin uses the cached jar file.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
If there is a cached version of a jar file, the java plugin should make a correct request to the web server to check if it is outdated. The java plugin should not change "example.jar" to "example.jar.pack.gz". Or if this is a standard behaviour, the plugin should handle Status-multiple-choices replies correctly.
ACTUAL -
The java plugin makes a request for "example.jar.pack.gz" instead of "example.jar" and does not handle the web server response "Status-multiple-choices" correctly.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
* SecurityException: Illegal URL redirect
* ClassFormatError: Incompatible magic value 1008813135 in class... (this is the beginning of the multiple-choice response <!DO ...)
* ClassNotFoundException: ...
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
http://www.schulphysik.de/java/physlet/applets/truckrace.html
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
If you clear the java cache, then the applet will start correctly for one time. (The next time the applet is in the cache again, ...)
1.7.0_06
1.7.0_07
ADDITIONAL OS VERSION INFORMATION :
Windows Vista
Windows 7
Windows 8
A DESCRIPTION OF THE PROBLEM :
If there is a cached version of a requested jar file for an applet, the java plugin makes a request to the web server for a jar.pack.gz file, which will not exist in most cases. If the web server does not respond Status-not-found but Status-multiple-choices, the plugin does not start the java applet at all.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please consider the following java applet for example:
http://www.schulphysik.de/java/physlet/applets/truckrace.html
If one loads the java applet for the first time, everything works fine.
And this is the network recording:
HTTP:Request, GET /java/physlet/classes/Animator4_.jar
HTTP:Response, HTTP/1.1, Status: Ok
Now, the jar file is in the cache.
Now, close the browser and try to open it again.
Now, the applet does not start.
This is the network recording:
GET /java/physlet/classes/Animator4_.jar.pack.gz
HTTP:Response, HTTP/1.1, Status: Multiple choices
For some reason, the plugin now tries to request a jar.pack.gz file, which does not exist, instead of the jar file. Now, if the web server is configered not to respond with a Status-not-found but with a Status-multiple-choices, then the java plugin does neither load the correct jar file nor uses the cached version.
If, however, the webserver would respond with a Status-not-found then the plugin uses the cached jar file.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
If there is a cached version of a jar file, the java plugin should make a correct request to the web server to check if it is outdated. The java plugin should not change "example.jar" to "example.jar.pack.gz". Or if this is a standard behaviour, the plugin should handle Status-multiple-choices replies correctly.
ACTUAL -
The java plugin makes a request for "example.jar.pack.gz" instead of "example.jar" and does not handle the web server response "Status-multiple-choices" correctly.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
* SecurityException: Illegal URL redirect
* ClassFormatError: Incompatible magic value 1008813135 in class... (this is the beginning of the multiple-choice response <!DO ...)
* ClassNotFoundException: ...
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
http://www.schulphysik.de/java/physlet/applets/truckrace.html
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
If you clear the java cache, then the applet will start correctly for one time. (The next time the applet is in the cache again, ...)
- backport of
-
JDK-7195873 cached applet jar files lead to incorrect requests from web server
- Resolved