JDK-6439651 : Sending "Cookie" header with JRE 1.5.0_07 doesn't work anymore
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2003,windows_xp
  • CPU: x86
  • Submitted: 2006-06-16
  • Updated: 2011-02-16
  • Resolved: 2006-07-01
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 JDK 6
5.0u10Fixed 6 b91Fixed
Description
FULL PRODUCT VERSION :
Java HotSpot(TM) Client VM 1.5.0_07-b03

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
We have an client/server application consisting of an applet which communicates with a servlet. In order to manage the session, the JSESSIONID cookie transmitted by the serlvet in the Set-Cookie response header is set as a cookie using the setRequestProperty API.
This worked in all previous JREs including 1.5.0_06.

Probably the fix for 2132633 (or 6360774) is reponsible for this regression.


REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : 5.0u6
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
EVALUATION This bug is fixed in Java SE 6 build 91 and Java SE 5.0u10
21-08-2006

EVALUATION Any cookies set by user code through setRequestProperty/addRequestProperty will be maintained for every request (authentication retry, redirection, etc) sent by the HttpURLConnection instance. If there is a global CookieHandler set ( plugin and webstart set a glabal cookieHandler ) then the user code needs to be aware of this and not duplicate any cookies, as this could lead to problems when parsing on the server side.
21-06-2006

EVALUATION This is as a result of the fix for 6360774. We should not clear any cookie headers if they are set by user code.
16-06-2006