Author: jfrederic.clere(a)jboss.com
Date: 2010-08-24 10:29:16 -0400 (Tue, 24 Aug 2010)
New Revision: 1541
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/util/http/Cookies.java
Log:
Fix for JBPAPP-2039.
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/util/http/Cookies.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/util/http/Cookies.java 2010-08-20
15:16:04 UTC (rev 1540)
+++
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/util/http/Cookies.java 2010-08-24
14:29:16 UTC (rev 1541)
@@ -60,14 +60,21 @@
'\t':9 ' ':32 '\"':34 '\'':39 '(':40
')':41 ',':44 ':':58 ';':59 '<':60
'=':61 '>':62 '?':63 '@':64 '[':91
'\\':92 ']':93 '{':123 '}':125
*/
- public static final char SEPARATORS[] = { '\t', ' ',
'\"', '\'', '(', ')', ',',
- ':', ';', '<', '=', '>',
'?', '@', '[', '\\', ']', '{', '}'
};
+ public static final char SEPARATORS[];
protected static final boolean separators[] = new boolean[128];
static {
for (int i = 0; i < 128; i++) {
separators[i] = false;
}
+ if
(Boolean.valueOf(System.getProperty("org.apache.tomcat.util.http.ServerCookie.VERSION_SWITCH",
"false")).booleanValue()) {
+ /* Version 1 separators */
+ SEPARATORS = new char[] { '\t', ' ', '\"',
'\'', '(', ')', ',',
+ ':', ';', '<', '=', '>',
'?', '@', '[', '\\', ']', '{', '}'
};
+ } else {
+ /* Version 0 separators */
+ SEPARATORS = new char[] { ',', ';', ' ',
'\t', '='};
+ }
for (int i = 0; i < SEPARATORS.length; i++) {
separators[SEPARATORS[i]] = true;
}