Index: java/org/apache/tomcat/util/http/ServerCookie.java =================================================================== --- java/org/apache/tomcat/util/http/ServerCookie.java (revision 726916) +++ java/org/apache/tomcat/util/http/ServerCookie.java (working copy) @@ -288,22 +288,22 @@ // Max-Age=secs ... or use old "Expires" format // TODO RFC2965 Discard if (maxAge >= 0) { - if (version == 0) { - // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires Netscape format ) - buf.append ("; Expires="); - // To expire immediately we need to set the time in past - if (maxAge == 0) - buf.append( ancientDate ); - else - DateTool.formatOldCookie - (new Date( System.currentTimeMillis() + - maxAge *1000L), buf, - new FieldPosition(0)); - - } else { + if (version > 0) { buf.append ("; Max-Age="); buf.append (maxAge); } + + // Append old-stlye Expires parameter, required by IE6 & IE7 + // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires Netscape format ) + buf.append ("; Expires="); + // To expire immediately we need to set the time in past + if (maxAge == 0) + buf.append( ancientDate ); + else + DateTool.formatOldCookie + (new Date( System.currentTimeMillis() + + maxAge *1000L), buf, + new FieldPosition(0)); } // Path=path