JDK-6274659 : ResponseCache get and put method decode original URL
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2005-05-23
  • Updated: 2010-04-02
  • Resolved: 2005-07-25
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.
JDK 6
6Resolved
Related Reports
Duplicate :  
Description
If you install a custom cache handler and implement the ResponseCache get and put method, you will find out the uri that got passed into the get and put method is decoded, if the original url contains encoded character (e.g %3a).

e.g if you open a url connection:

http://javaweb.sfbay/~ngthomas/getput/%3aimage/draw.jpg

it will becomes:

http://javaweb.sfbay/~ngthomas/getput/:image/draw.jpg

when it get passed into ResponseCache.get and put

testcase:

http://javaweb.sfbay/~ngthomas/getput/HelloWorld.html

testcase source:

http://javaweb.sfbay/~ngthomas/getput/

###@###.### 2005-05-23 18:44:31 GMT

Comments
EVALUATION Yes, the path is being decoded before creating the URI. This doesn't not seem right, but requires investigation, particularly when it comes as to what is specified in the documentation. ###@###.### 2005-06-01 16:07:17 GMT
01-06-2005

SUGGESTED FIX url that get passed to ResponseCache should be the same as the orignating url, and should not be encoded or decoded ###@###.### 2005-05-23 18:45:23 GMT
23-05-2005