You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by na...@locus.apache.org on 2000/11/20 03:09:03 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/helper CookieTools.java
nacho 00/11/19 18:09:02
Modified: src/share/org/apache/tomcat/helper CookieTools.java
Log:
Bad cookie format, needs a space after semicolons
Revision Changes Path
1.6 +10 -10 jakarta-tomcat/src/share/org/apache/tomcat/helper/CookieTools.java
Index: CookieTools.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/helper/CookieTools.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CookieTools.java 2000/10/27 20:50:51 1.5
+++ CookieTools.java 2000/11/20 02:09:01 1.6
@@ -192,45 +192,45 @@
// add version 1 specific information
if (version == 1) {
// Version=1 ... required
- buf.append (";Version=1");
+ buf.append ("; Version=1");
// Comment=comment
if (cookie.getComment() != null) {
- buf.append (";Comment=");
+ buf.append ("; Comment=");
maybeQuote (version, buf, cookie.getComment().toString());
}
}
// add domain information, if present
- if (cookie.getDomain().isNull()) {
- buf.append(";Domain=");
+ if (!cookie.getDomain().isNull()) {
+ buf.append("; Domain=");
maybeQuote (version, buf, cookie.getDomain().toString());
}
// Max-Age=secs/Discard ... or use old "Expires" format
if (cookie.getMaxAge() >= 0) {
if (version == 0) {
- buf.append (";Expires=");
+ buf.append ("; Expires=");
DateTool.oldCookieFormat.format(new Date( System.currentTimeMillis() + cookie.getMaxAge() *1000L) ,buf,
new FieldPosition(0));
} else {
- buf.append (";Max-Age=");
+ buf.append ("; Max-Age=");
buf.append (cookie.getMaxAge());
}
} else if (version == 1)
- buf.append (";Discard");
+ buf.append ("; Discard");
// Path=path
- if (cookie.getPath().isNull()) {
- buf.append (";Path=");
+ if (! cookie.getPath().isNull()) {
+ buf.append ("; Path=");
maybeQuote (version, buf, cookie.getPath().toString());
}
// Secure
if (cookie.getSecure()) {
- buf.append (";Secure");
+ buf.append ("; Secure");
}
}