You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Erik Bruchez <eb...@unet.urbanet.ch> on 2000/01/14 04:28:34 UTC

Problem with cookie expiration and IE

Hi,

I don't know if this is a known problem, but I have issues with Tomcat
cookies and IE (IE 5, at least) wrt cookie expiration. This works
correctly w/ Netscape and Mozilla, and with Apache/JServ. I use Tomcat
as a standalone server. This is what I do (trivial):

Cookie cookie = new Cookie(name, value);
cookie.setMaxAge(max_age);
response.addCookie();

The header sent to the client looks like:

  Set-Cookie: name=value;Expires=Fri, 14-Jan-2000 03:07:48 PST

This is obviously the old format. If I hack Tomcat to get:

  Set-Cookie: name=value;MaxAge=28800

it works. Now I thought that forcing the cookie version to 1 would
work, but in this case Tomcat sends both Set-Cookie and Set-Cookie2,
and it looks like IE doesn't get that either.

I'd appreciate any hint as to how this should be solved.

Thanks!

-Erik