Author: remy.maucherat(a)jboss.com
Date: 2009-10-16 09:02:04 -0400 (Fri, 16 Oct 2009)
New Revision: 1199
Modified:
trunk/java/org/apache/tomcat/util/http/ServerCookie.java
Log:
- Only v1 cookies can send comments, so for now switch versions if allowed and a comment
is configured.
Modified: trunk/java/org/apache/tomcat/util/http/ServerCookie.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2009-10-16 10:34:28 UTC (rev
1198)
+++ trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2009-10-16 13:02:04 UTC (rev
1199)
@@ -290,7 +290,12 @@
buf.append( name );
buf.append("=");
// Servlet implementation does not check anything else
-
+
+ // Switch version if allowed and a comment has been configured
+ if (version == 0 && comment != null && VERSION_SWITCH) {
+ version = 1;
+ }
+
version = maybeQuote2(version, buf, value,true);
// Add version 1 specific information
Show replies by date