I cannot delete some cookies (2) from the request and I don't know why...
I tried this ways:
Set expiration to 0, value to blank, secure flag to false
@GET
@Path("clear-cookies")
public Response clear-cookies(@QueryParam(NEXT) String next) throws Exception {
Viewable page = getPage();
// Returns form and remove cookies, setting expiration time to zero.
return javax.ws.rs.core.Response
.ok(page)
.cookie(new NewCookie(NEXT, next))
.cookie(new NewCookie(FIRST, "", null, null, null, 0, false))
.cookie(new NewCookie(SECOND, "", null, null, null, 0, false))
.build();
}
Set expiration to 0, value to null, secure flag to true
@GET
@Path("clear-cookies")
public Response clear-cookies(@QueryParam(NEXT) String next) throws Exception {
Viewable page = getPage();
// Returns form and remove cookies, setting expiration time to zero.
return javax.ws.rs.core.Response
.ok(page)
.cookie(new NewCookie(NEXT, next))
.cookie(new NewCookie(FIRST, null, null, null, null, 0, true))
.cookie(new NewCookie(SECOND, null, null, null, null, 0, true))
.build();
}