From: fhanik Date: Sat, 23 Feb 2008 20:51:23 +0000 (+0000) Subject: Use the same name on the static variable for servlet compliance X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=892fd24b6f5e1efdb941c9c31c3c469bdbfb1d5a;p=tomcat7.0 Use the same name on the static variable for servlet compliance git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@630533 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/http/ServerCookie.java b/java/org/apache/tomcat/util/http/ServerCookie.java index 75697b864..59dc717d6 100644 --- a/java/org/apache/tomcat/util/http/ServerCookie.java +++ b/java/org/apache/tomcat/util/http/ServerCookie.java @@ -51,7 +51,12 @@ public class ServerCookie implements Serializable { private int maxAge = -1; private int version = 0; - protected static boolean switchToV1Cookies = !Boolean.valueOf(System.getProperty("org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "false")).booleanValue(); + /** + * If set to true, we parse cookies according to the servlet spec, + */ + public static final boolean STRICT_SERVLET_COMPLIANCE = + Boolean.valueOf(System.getProperty("org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "false")).booleanValue(); + // Note: Servlet Spec =< 2.5 only refers to Netscape and RFC2109, // not RFC2965 @@ -340,7 +345,7 @@ public class ServerCookie implements Serializable { buf.append('"'); buf.append(escapeDoubleQuotes(value,1,value.length()-1)); buf.append('"'); - } else if (switchToV1Cookies && version==0 && !isToken2(value)) { + } else if ((!STRICT_SERVLET_COMPLIANCE) && version==0 && !isToken2(value)) { buf.append('"'); buf.append(escapeDoubleQuotes(value,0,value.length())); buf.append('"');