tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Barkon <igorbar...@att.net>
Subject Re: Tomcat 6.0.29 Cookie.getMaxAge() always returns -1 regardless of actual value of maximum age
Date Tue, 16 Nov 2010 20:40:55 GMT
I created cookie as a parameter on IE and sent it to Tomcat. On server the 
parameter was transformed to a cookie and sent back to IE. Next time when IE 
sent new request to the server, the old cookie is part of Request (now it is 
cookie, nort parameter), so I can display this information to verify.

I also believe that IE just sent incomplete information to Server, only name and 
value.


________________________________
From: Christopher Schultz <chris@christopherschultz.net>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Tue, November 16, 2010 1:57:44 PM
Subject: Re: Tomcat 6.0.29 Cookie.getMaxAge() always returns -1 regardless of 
actual value of maximum age

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Igor,

On 11/16/2010 11:58 AM, Igor Barkon wrote:
> I run Tomcat 6.0.29 on Windows XP and IE 8.0.6001.18702.
> 
> I noticed that getMaxAge() method of any cookie always returns -1 even for 
> persistent cookie with real positive value of maximum age. IE treats this 
>cookie 
>
> correctly: cookie persists for amount of seconds specified by setMaxAge method. 
>
> But getMaxAge always return -1. Based on specification getMaxAge must return 
> actual value of maximum age of a given cookie, not default value. Is this a 
>bug?

Are you checking the cookie you are generating on the server-side, or
are you inspecting the cookie sent by the client afterward? Clients
often do not send 100% of the cookie information back to the server with
the request.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzi4jgACgkQ9CaO5/Lv0PBpNwCfY1sifVzpczJODgPtBVPOFHj7
vXYAn07z64NXN1UcAUpfAiii2nfLu9ba
=j3LO
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message