Cookies
Round Trip Behaviour
The following tables document how a value is sent in a Set-Cookie header, what gets stored by a typical browser, the Cookie header that is generated by the browser and then the final value returned to a Servlet application.
The browser tested here is Chrome-31
Default Configuration (no properties set)
| Generation |
| Browser Value | Parsing |
|
Version | Value | Set-Cookie Header | Cookie Header | Resulting Value | |
0 | bar | test=bar | bar | test=bar | bar |
0 | "bar" | test="bar" | "bar" | test="bar" | bar |
0 | "" | test="" | "" | test="" | emptyString |
0 | a"b | test="a\"b"; Version=1 | "a\"b" | test="a\"b" | a"b |
0 | a\b | test="a\b"; Version=1 | "a\b" | test="a\b" | ab |
0 | a?b | test="a?b"; Version=1 | "a?b" | test="a?b" | a?b |
1 | bar | test=bar; Version=1 | bar | test=bar | bar |
ALLOW_HTTP_SEPARATORS_IN_V0=true
| Generation |
| Browser Value | Parsing |
|
Version | Value | Set-Cookie Header | Cookie Header | Resulting Value | |
0 | bar | test=bar | bar | test=bar | bar |
0 | "bar" | test="bar" | "bar" | test="bar" | bar |
0 | "" | test="" | "" | test="" | emptyString |
0 | a"b | test=a"b | a"b | test=a"b | a"b |
0 | a\b | test=a\b | a\b | test=a\b | ab |
0 | a?b | test=a?b | a?b | test=a?b | a?b |
1 | bar | test=bar; Version=1 | bar | test=bar | bar |
Proposed Changes
The intent of the following changes is improve interoperability of cookies with other servers and with client-side JavaScript. The primary changes are a switch to the RFC6265 format for transmission of V0 cookies to be more in line with browser behaviour, and support for UTF-8 encoded values that are now specified by HTML-5.
...