Description
The WicketTester does not save cookies that have an age of -1 (the default if you do not set a maxAge). These cookies should be treated as session cookies and should be deleted when the browser exits (or in this case, when the WicketTester browsing session is thrown away). This used to work in 1.4.1, but fails to work in 1.4.8. I believe that the fix introduced by WICKET-2630 causes this behavior.
The description in WICKET-2630 only quotes part of the javadoc for Cookies. The actual javadoc (http://java.sun.com/javaee/6/docs/api/javax/servlet/http/Cookie.html#setMaxAge%28int%29) reads:
A positive value indicates that the cookie will expire after that many seconds have passed. Note that the value is the maximum age when the cookie will expire, not the cookie's current age.
A negative value means that the cookie is not stored persistently and will be deleted when the Web browser exits. A zero value causes the cookie to be deleted.
Attachments
Issue Links
- relates to
-
WICKET-2630 MockHttpServletResponse doesn't delete cookies
- Resolved