Author: remy.maucherat(a)jboss.com
Date: 2011-06-30 12:56:08 -0400 (Thu, 30 Jun 2011)
New Revision: 1755
Modified:
trunk/java/org/apache/tomcat/util/http/CookieSupport.java
trunk/webapps/docs/changelog.xml
Log:
- Change the default value of '/' as a separator, which is no longer going to be
based on
the strict compliance flag.
Modified: trunk/java/org/apache/tomcat/util/http/CookieSupport.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/CookieSupport.java 2011-06-30 16:24:05 UTC (rev
1754)
+++ trunk/java/org/apache/tomcat/util/http/CookieSupport.java 2011-06-30 16:56:08 UTC (rev
1755)
@@ -55,8 +55,7 @@
/**
* If set to true, the <code>/</code> character will be treated as a
- * separator. Default is usually false. If STRICT_SERVLET_COMPLIANCE==true
- * then default is true. Explicitly setting always takes priority.
+ * separator. Default is false.
*/
public static final boolean FWD_SLASH_IS_SEPARATOR;
@@ -89,6 +88,10 @@
"org.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0",
"false")).booleanValue();
+ FWD_SLASH_IS_SEPARATOR = Boolean.valueOf(System.getProperty(
+
"org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR",
+ "false")).booleanValue();
+
String alwaysAddExpires = System.getProperty(
"org.apache.tomcat.util.http.ServerCookie.ALWAYS_ADD_EXPIRES");
if (alwaysAddExpires == null) {
@@ -98,15 +101,6 @@
Boolean.valueOf(alwaysAddExpires).booleanValue();
}
- String fwdSlashIsSeparator = System.getProperty(
-
"org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR");
- if (fwdSlashIsSeparator == null) {
- FWD_SLASH_IS_SEPARATOR = STRICT_SERVLET_COMPLIANCE;
- } else {
- FWD_SLASH_IS_SEPARATOR =
- Boolean.valueOf(fwdSlashIsSeparator).booleanValue();
- }
-
/*
Excluding the '/' char by default violates the RFC, but
it looks like a lot of people put '/'
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-06-30 16:24:05 UTC (rev 1754)
+++ trunk/webapps/docs/changelog.xml 2011-06-30 16:56:08 UTC (rev 1755)
@@ -24,6 +24,10 @@
when requesting a reader/writer caused by encoding to charset conversion
bottleneck. (remm, markt)
</fix>
+ <fix>
+ Stop considering '/' as a separator in cookies by default (based on the
+ compliance flag being true by default). (remm)
+ </fix>
</changelog>
</subsection>
</section>
Show replies by date