tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 55920] Quotes should not be removed from quoted cookie values
Date Sat, 04 Jan 2014 18:59:41 GMT

--- Comment #1 from Jeremy Boynes <> ---
As an example, a cookie with value «"value"» (I'm using angled quotes in this
comment for clarity) that is set using:
  Cookie cookie = new Cookie("test", "\"value\"");
will correctly set a cookie in the browser with the value «"value"»  that will
then be returned to the server. However, when the value is retrieved using
getCookies() and getValue() the string returned is just «value» 

However, if the value supplied is «a"b» then the value set in the browser
becomes «"a\"b"» which does not match the value set. This will be returned to
servers using the header:
Tomcat removes the leading and trailing quotes resulting a self-consistent
round trip but other servers that treat this correctly as a V0 header will
include those quotes in the value resulting in inconsistency.

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message