Author: remy.maucherat(a)jboss.com
Date: 2009-04-17 08:02:55 -0400 (Fri, 17 Apr 2009)
New Revision: 1016
Modified:
trunk/conf/catalina.properties
trunk/java/org/apache/catalina/startup/catalina.properties
trunk/java/org/apache/tomcat/util/buf/StringCache.java
trunk/java/org/apache/tomcat/util/http/ServerCookie.java
trunk/res/jboss/org/apache/catalina/startup/catalina.properties
trunk/webapps/docs/sysprops.xml
Log:
- Port JF's dedicated version switch flag, independent of strict servlet compliance.
- Change some other properties to org.apache.*.
Modified: trunk/conf/catalina.properties
===================================================================
--- trunk/conf/catalina.properties 2009-04-17 10:59:59 UTC (rev 1015)
+++ trunk/conf/catalina.properties 2009-04-17 12:02:55 UTC (rev 1016)
@@ -60,7 +60,7 @@
#
# String cache configuration.
-tomcat.util.buf.StringCache.byte.enabled=true
-#tomcat.util.buf.StringCache.char.enabled=true
-#tomcat.util.buf.StringCache.trainThreshold=500000
-#tomcat.util.buf.StringCache.cacheSize=5000
+org.apache.tomcat.util.buf.StringCache.byte.enabled=true
+#org.apache.tomcat.util.buf.StringCache.char.enabled=true
+#org.apache.tomcat.util.buf.StringCache.trainThreshold=500000
+#org.apache.tomcat.util.buf.StringCache.cacheSize=5000
Modified: trunk/java/org/apache/catalina/startup/catalina.properties
===================================================================
--- trunk/java/org/apache/catalina/startup/catalina.properties 2009-04-17 10:59:59 UTC
(rev 1015)
+++ trunk/java/org/apache/catalina/startup/catalina.properties 2009-04-17 12:02:55 UTC
(rev 1016)
@@ -60,7 +60,7 @@
#
# String cache configuration.
-tomcat.util.buf.StringCache.byte.enabled=true
-#tomcat.util.buf.StringCache.char.enabled=true
-#tomcat.util.buf.StringCache.trainThreshold=500000
-#tomcat.util.buf.StringCache.cacheSize=5000
+org.apache.tomcat.util.buf.StringCache.byte.enabled=true
+#org.apache.tomcat.util.buf.StringCache.char.enabled=true
+#org.apache.tomcat.util.buf.StringCache.trainThreshold=500000
+#org.apache.tomcat.util.buf.StringCache.cacheSize=5000
Modified: trunk/java/org/apache/tomcat/util/buf/StringCache.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/StringCache.java 2009-04-17 10:59:59 UTC (rev
1015)
+++ trunk/java/org/apache/tomcat/util/buf/StringCache.java 2009-04-17 12:02:55 UTC (rev
1016)
@@ -41,23 +41,23 @@
* Enabled ?
*/
protected static boolean byteEnabled =
-
("true".equals(System.getProperty("tomcat.util.buf.StringCache.byte.enabled",
"false")));
+
("true".equals(System.getProperty("org.apache.tomcat.util.buf.StringCache.byte.enabled",
"false")));
protected static boolean charEnabled =
-
("true".equals(System.getProperty("tomcat.util.buf.StringCache.char.enabled",
"false")));
+
("true".equals(System.getProperty("org.apache.tomcat.util.buf.StringCache.char.enabled",
"false")));
protected static int trainThreshold =
-
Integer.parseInt(System.getProperty("tomcat.util.buf.StringCache.trainThreshold",
"20000"));
+
Integer.parseInt(System.getProperty("org.apache.tomcat.util.buf.StringCache.trainThreshold",
"20000"));
protected static int cacheSize =
-
Integer.parseInt(System.getProperty("tomcat.util.buf.StringCache.cacheSize",
"200"));
+
Integer.parseInt(System.getProperty("org.apache.tomcat.util.buf.StringCache.cacheSize",
"200"));
protected static int maxStringSize =
-
Integer.parseInt(System.getProperty("tomcat.util.buf.StringCache.maxStringSize",
"128"));
+
Integer.parseInt(System.getProperty("org.apache.tomcat.util.buf.StringCache.maxStringSize",
"128"));
/**
Modified: trunk/java/org/apache/tomcat/util/http/ServerCookie.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2009-04-17 10:59:59 UTC (rev
1015)
+++ trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2009-04-17 12:02:55 UTC (rev
1016)
@@ -76,8 +76,8 @@
/**
* 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();
+ public static final boolean VERSION_SWITCH =
+
Boolean.valueOf(System.getProperty("org.apache.tomcat.util.http.ServerCookie.VERSION_SWITCH",
"true")).booleanValue();
// Note: Servlet Spec =< 2.5 only refers to Netscape and RFC2109,
@@ -391,7 +391,7 @@
buf.append('"');
buf.append(escapeDoubleQuotes(value,1,value.length()-1));
buf.append('"');
- } else if (allowVersionSwitch && (!STRICT_SERVLET_COMPLIANCE) &&
version==0 && !isToken2(value, literals)) {
+ } else if (allowVersionSwitch && VERSION_SWITCH && version==0
&& !isToken2(value, literals)) {
buf.append('"');
buf.append(escapeDoubleQuotes(value,0,value.length()));
buf.append('"');
Modified: trunk/res/jboss/org/apache/catalina/startup/catalina.properties
===================================================================
--- trunk/res/jboss/org/apache/catalina/startup/catalina.properties 2009-04-17 10:59:59
UTC (rev 1015)
+++ trunk/res/jboss/org/apache/catalina/startup/catalina.properties 2009-04-17 12:02:55
UTC (rev 1016)
@@ -8,9 +8,10 @@
org.apache.catalina.core.StandardHost.deployOnStartup=false
org.apache.catalina.core.StandardHost.deployXML=false
org.apache.catalina.core.StandardHost.startChildren=false
+org.apache.tomcat.util.http.ServerCookie.VERSION_SWITCH=false
# String cache configuration.
-tomcat.util.buf.StringCache.byte.enabled=true
-#tomcat.util.buf.StringCache.char.enabled=true
-#tomcat.util.buf.StringCache.trainThreshold=500000
-#tomcat.util.buf.StringCache.cacheSize=5000
+org.apache.tomcat.util.buf.StringCache.byte.enabled=true
+#org.apache.tomcat.util.buf.StringCache.char.enabled=true
+#org.apache.tomcat.util.buf.StringCache.trainThreshold=500000
+#org.apache.tomcat.util.buf.StringCache.cacheSize=5000
Modified: trunk/webapps/docs/sysprops.xml
===================================================================
--- trunk/webapps/docs/sysprops.xml 2009-04-17 10:59:59 UTC (rev 1015)
+++ trunk/webapps/docs/sysprops.xml 2009-04-17 12:02:55 UTC (rev 1016)
@@ -67,30 +67,30 @@
<p>The URL for the catalina.properties configuration file.</p>
</property>
- <property name="tomcat.util.buf.StringCache.byte.enabled">
+ <property
name="org.apache.tomcat.tomcat.util.buf.StringCache.byte.enabled">
<p>If <code>true</code>, the String cache is enabled for
<code>ByteChunk</code>. If not specified, the default value of
<code>false</code> will be used.</p>
</property>
- <property name="tomcat.util.buf.StringCache.char.enabled">
+ <property
name="org.apache.tomcat.tomcat.util.buf.StringCache.char.enabled">
<p>If <code>true</code>, the String cache is enabled for
<code>CharChunk</code>. If not specified, the default value of
<code>false</code> will be used.</p>
</property>
- <property name="tomcat.util.buf.StringCache.trainThreshold">
+ <property
name="org.apache.tomcat.tomcat.util.buf.StringCache.trainThreshold">
<p>The number of times <code>toString()</code> must be called
before the
cache is activated. If not specified, the default value of
<code>20000</code> will be used.</p>
</property>
- <property name="tomcat.util.buf.StringCache.cacheSize">
+ <property
name="org.apache.tomcat.tomcat.util.buf.StringCache.cacheSize">
<p>The size of the String cache. If not specified, the default value of
<code>200</code> will be used.</p>
</property>
- <property name="tomcat.util.buf.StringCache.maxStringSize">
+ <property
name="org.apache.tomcat.tomcat.util.buf.StringCache.maxStringSize">
<p>The maximum length of String that will be cached. If not specified, the
default value of <code>128</code> will be used.</p>
</property>
@@ -120,6 +120,12 @@
the default value of <code>false</code> will be used.</p>
</property>
+ <property name="org.apache.tomcat.util.
http.ServerCookie.VERSION_SWITCH">
+ <p>If using cookie values which have to be quoted to be valid and v0
cookies,
+ this will cause an automatic switch to v1 cookies. If not
+ specified, the default value of <code>true</code> will be
used.</p>
+ </property>
+
</properties>
</section>