tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 3799] - Setting null cookie value throws exception
Date Tue, 25 Sep 2001 20:36:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3799>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3799

Setting null cookie value throws exception

craig.mcclanahan@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From craig.mcclanahan@sun.com  2001-09-25 13:36 -------
According to the Javadocs for Cookie, the proper way to delete a cookie is to
set the max age to zero before adding it:

  Cookie cookie = new Cookie("foo", "arbitrary value");
  cookie.setMaxAge(0);
  response.addCookie(cookie);

Even if Tomcat is changed to not throw an NPE in this case, your cookie will
still not be deleted.

Mime
View raw message