Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4670429
Votes 0
Synopsis URLConnection openConnection with setUseCaches(true) fails (jpg, gif)
Category java_plugin:install
Reported Against 1.4
Release Fixed 1.4.1_04, 1.4.1_05(Bug ID:2053805) , 1.4.2(mantis) (Bug ID:2053806)
State 10-Fix Delivered, Verified, bug
Priority: 4-Low
Related Bugs
Submit Date 18-APR-2002
Description




FULL PRODUCT VERSION :
Java(TM) Plug-in: Version 1.3.1_02
Using JRE version 1.3.1_02 Java HotSpot(TM) Client VM
  User home directory = C:\Documents and Settings\amilkowski


FULL OPERATING SYSTEM VERSION :
 customer  Windows XP
Professional
Version 2002


EXTRA RELEVANT SYSTEM CONFIGURATION :
Java(TM) Plug-in: Version 1.3.1_02
Using JRE version 1.3.1_02 Java HotSpot(TM) Client VM
  User home directory = C:\Documents and Settings\amilkowski


A DESCRIPTION OF THE PROBLEM :
in the applet environment when using URLConnection class
method openConnection AND setting setUseCaches to true
fails to return HTTP response headers (jpg & gif MIME types)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. using IE6 enabled with Java-Plug 1.3.1_02 open url
containing Applet tag pointing to test applet (attache) i.e

2. make sure all MIME resources are present as follows:
http://127.0.0.1/classes/ulogo.jpg
http://127.0.0.1/classes/faceimg.gif

you can use any jpg, gif, an applet need to
be recompiled to point to new resource names

Note that , if the MIME resource does not exist, (404 HTTP
Status code will be returned as expected, what is not
working is when the resource exists, and should return 200
HTTP status code)

2. note two outputs in the java console (one with
setUseCache set to true, HTTP Headers not returned, the
second output with setUseCache set to false, working fine)



EXPECTED VERSUS ACTUAL BEHAVIOR :
setting setUseCache to true with URClonnection method
openConnection should return valid HTTP response headers

instead following java console output is returned:
(for MIME types: gif & jpg)

Java(TM) Plug-in: Version 1.4.0
Using JRE version 1.4.0 Java HotSpot(TM) Client VM
  User home directory = C:\Documents and Settings\amilkowski

Proxy Configuration: No proxy





----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system properties
t:   dump thread list
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
java.lang.InternalError: unimplemented

	at sun.awt.windows.WEmbeddedFrame.print(Unknown
Source)

setUseCaches set to true


uri:http://127.0.0.1/classes/ulogo.jpg

java.lang.InternalError: unimplemented

	at sun.awt.windows.WEmbeddedFrame.print(Unknown
Source)

HTTP::RESPONSE Header[0]: HTTP-Status=null




uri:http://127.0.0.1/classes/faceimg.gif

HTTP::RESPONSE Header[0]: HTTP-Status=null




uri:http://127.0.0.1/classes/testapplet.zip

HTTP::RESPONSE Header[0]: HTTP-Status=HTTP/1.1 200 OK

HTTP::RESPONSE HEADER[1]Date=Mon, 18 Mar 2002 18:06:49 GMT

HTTP::RESPONSE HEADER[2]Server= customer /1.3.23 (Win32) mod_jk

HTTP::RESPONSE HEADER[3]Last-Modified=Mon, 18 Mar 2002
16:46:19 GMT

HTTP::RESPONSE HEADER[4]ETag="0-a20-3c9619db"

HTTP::RESPONSE HEADER[5]Accept-Ranges=bytes

HTTP::RESPONSE HEADER[6]Content-Length=2592

HTTP::RESPONSE HEADER[7]Keep-Alive=timeout=15, max=100

HTTP::RESPONSE HEADER[8]Connection=Keep-Alive

HTTP::RESPONSE HEADER[9]Content-Type=application/zip




uri:http://127.0.0.1/classes/testapplet.jar

HTTP::RESPONSE Header[0]: HTTP-Status=HTTP/1.1 200 OK

HTTP::RESPONSE HEADER[1]Date=Mon, 18 Mar 2002 18:06:49 GMT

HTTP::RESPONSE HEADER[2]Server= customer /1.3.23 (Win32) mod_jk

HTTP::RESPONSE HEADER[3]Last-Modified=Mon, 18 Mar 2002
16:47: customer  GMT

HTTP::RESPONSE HEADER[4]ETag="0-a20-3c961a06"

HTTP::RESPONSE HEADER[5]Accept-Ranges=bytes

HTTP::RESPONSE HEADER[6]Content-Length=2592

HTTP::RESPONSE HEADER[7]Keep-Alive=timeout=15, max=100

HTTP::RESPONSE HEADER[8]Connection=Keep-Alive

HTTP::RESPONSE HEADER[9]Content-Type=text/plain




uri:http://127.0.0.1/classes/test.html

HTTP::RESPONSE Header[0]: HTTP-Status=HTTP/1.1 200 OK

HTTP::RESPONSE HEADER[1]Date=Mon, 18 Mar 2002 18:06:49 GMT

HTTP::RESPONSE HEADER[2]Server= customer /1.3.23 (Win32) mod_jk

HTTP::RESPONSE HEADER[3]Last-Modified=Mon, 18 Mar 2002
16:25:39 GMT

HTTP::RESPONSE HEADER[4]ETag="0-127-3c961503"

HTTP::RESPONSE HEADER[5]Accept-Ranges=bytes

HTTP::RESPONSE HEADER[6]Content-Length=295

HTTP::RESPONSE HEADER[7]Keep-Alive=timeout=15, max=100

HTTP::RESPONSE HEADER[8]Connection=Keep-Alive

HTTP::RESPONSE HEADER[9]Content-Type=text/html




setUseCaches set to false


uri:http://127.0.0.1/classes/ulogo.jpg

HTTP::RESPONSE Header[0]: HTTP-Status=HTTP/1.1 200 OK

HTTP::RESPONSE HEADER[1]Date=Mon, 18 Mar 2002 18:06:49 GMT

HTTP::RESPONSE HEADER[2]Server= customer /1.3.23 (Win32) mod_jk

HTTP::RESPONSE HEADER[3]Last-Modified=Tue, 12 Feb 2002
19:03:00 GMT

HTTP::RESPONSE HEADER[4]ETag="0-71c-3c6966e4"

HTTP::RESPONSE HEADER[5]Accept-Ranges=bytes

HTTP::RESPONSE HEADER[6]Content-Length=1820

HTTP::RESPONSE HEADER[7]Keep-Alive=timeout=15, max=100

HTTP::RESPONSE HEADER[8]Connection=Keep-Alive

HTTP::RESPONSE HEADER[9]Content-Type=image/jpeg




uri:http://127.0.0.1/classes/faceimg.gif

HTTP::RESPONSE Header[0]: HTTP-Status=HTTP/1.1 200 OK

HTTP::RESPONSE HEADER[1]Date=Mon, 18 Mar 2002 18:06:49 GMT

HTTP::RESPONSE HEADER[2]Server= customer /1.3.23 (Win32) mod_jk

HTTP::RESPONSE HEADER[3]Last-Modified=Tue, 12 Feb 2002
19:03:00 GMT

HTTP::RESPONSE HEADER[4]ETag="0-63f1-3c6966e4"

HTTP::RESPONSE HEADER[5]Accept-Ranges=bytes

HTTP::RESPONSE HEADER[6]Content-Length=25585

HTTP::RESPONSE HEADER[7]Keep-Alive=timeout=15, max=100

HTTP::RESPONSE HEADER[8]Connection=Keep-Alive

HTTP::RESPONSE HEADER[9]Content-Type=image/gif




uri:http://127.0.0.1/classes/testapplet.zip

HTTP::RESPONSE Header[0]: HTTP-Status=HTTP/1.1 200 OK

HTTP::RESPONSE HEADER[1]Date=Mon, 18 Mar 2002 18:06:49 GMT

HTTP::RESPONSE HEADER[2]Server= customer /1.3.23 (Win32) mod_jk

HTTP::RESPONSE HEADER[3]Last-Modified=Mon, 18 Mar 2002
16:46:19 GMT

HTTP::RESPONSE HEADER[4]ETag="0-a20-3c9619db"

HTTP::RESPONSE HEADER[5]Accept-Ranges=bytes

HTTP::RESPONSE HEADER[6]Content-Length=2592

HTTP::RESPONSE HEADER[7]Keep-Alive=timeout=15, max=100

HTTP::RESPONSE HEADER[8]Connection=Keep-Alive

HTTP::RESPONSE HEADER[9]Content-Type=application/zip




uri:http://127.0.0.1/classes/testapplet.jar

HTTP::RESPONSE Header[0]: HTTP-Status=HTTP/1.1 200 OK

HTTP::RESPONSE HEADER[1]Date=Mon, 18 Mar 2002 18:06:50 GMT

HTTP::RESPONSE HEADER[2]Server= customer /1.3.23 (Win32) mod_jk

HTTP::RESPONSE HEADER[3]Last-Modified=Mon, 18 Mar 2002
16:47: customer  GMT

HTTP::RESPONSE HEADER[4]ETag="0-a20-3c961a06"

HTTP::RESPONSE HEADER[5]Accept-Ranges=bytes

HTTP::RESPONSE HEADER[6]Content-Length=2592

HTTP::RESPONSE HEADER[7]Keep-Alive=timeout=15, max=100

HTTP::RESPONSE HEADER[8]Connection=Keep-Alive

HTTP::RESPONSE HEADER[9]Content-Type=text/plain




uri:http://127.0.0.1/classes/test.html

HTTP::RESPONSE Header[0]: HTTP-Status=HTTP/1.1 200 OK

HTTP::RESPONSE HEADER[1]Date=Mon, 18 Mar 2002 18:06:50 GMT

HTTP::RESPONSE HEADER[2]Server= customer /1.3.23 (Win32) mod_jk

HTTP::RESPONSE HEADER[3]Last-Modified=Mon, 18 Mar 2002
16:25:39 GMT

HTTP::RESPONSE HEADER[4]ETag="0-127-3c961503"

HTTP::RESPONSE HEADER[5]Accept-Ranges=bytes

HTTP::RESPONSE HEADER[6]Content-Length=295

HTTP::RESPONSE HEADER[7]Keep-Alive=timeout=15, max=100

HTTP::RESPONSE HEADER[8]Connection=Keep-Alive

HTTP::RESPONSE HEADER[9]Content-Type=text/html







This bug can be reproduced always.

Test Case Attached
---------- END SOURCE ----------
(Review ID: 144321) 
======================================================================
Work Around
N/A
Evaluation
Disable "cache" option from Plugin Control Panel, problem disappears. So, I think it is a caching bug.

  xxxxx@xxxxx   2002-04-22

Decommitting from hopper-beta.  After further evaluation, this bug only 
occurs in a limited circumstance.  This does not meet the showstopper
criteria.

  xxxxx@xxxxx   2002-05-07
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang