Author: remy.maucherat(a)jboss.com
Date: 2008-03-15 15:20:09 -0400 (Sat, 15 Mar 2008)
New Revision: 507
Modified:
trunk/java/org/apache/tomcat/util/http/ServerCookie.java
trunk/webapps/docs/changelog.xml
Log:
- Cookie patch refinement from Mark.
Modified: trunk/java/org/apache/tomcat/util/http/ServerCookie.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2008-03-14 17:36:31 UTC (rev
506)
+++ trunk/java/org/apache/tomcat/util/http/ServerCookie.java 2008-03-15 19:20:09 UTC (rev
507)
@@ -253,6 +253,18 @@
version = maybeQuote2(version, buf, value);
+ // Add domain information, if present
+ if (domain!=null) {
+ buf.append("; Domain=");
+ version = maybeQuote2(version, buf, domain);
+ }
+
+ // Path=path
+ if (path!=null) {
+ buf.append ("; Path=");
+ version = maybeQuote2(version, buf, path);
+ }
+
// Add version 1 specific information
if (version == 1) {
// Version=1 ... required
@@ -265,12 +277,6 @@
}
}
- // Add domain information, if present
- if (domain!=null) {
- buf.append("; Domain=");
- maybeQuote2(version, buf, domain);
- }
-
// Max-Age=secs ... or use old "Expires" format
// TODO RFC2965 Discard
if (maxAge >= 0) {
@@ -292,17 +298,6 @@
}
}
- // Path=path
- if (path!=null) {
- buf.append ("; Path=");
- if (version > 0) {
- // Don't quote the path for v0 cookies
- maybeQuote2(version, buf, path);
- } else {
- buf.append(path);
- }
- }
-
// Secure
if (isSecure) {
buf.append ("; Secure");
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-03-14 17:36:31 UTC (rev 506)
+++ trunk/webapps/docs/changelog.xml 2008-03-15 19:20:09 UTC (rev 507)
@@ -15,6 +15,18 @@
<body>
+<section name="JBoss Web 2.1.1.CR1 (remm)">
+
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ Better fix for cookie path quoting scenario. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+
+</section>
+
<section name="JBoss Web 2.1.0 (remm)">
<subsection name="General">
<changelog>