playframework/Play20 — pull request #923 by jroper (2013-04-15 08:33:35+00:00)
Title: Cookie discard may not discard the cookie for the next request

The code response().discardCookie("cookieName"); will generate a response HTTP header like this :
Set-Cookie: cookieName=; Expires=Sat, 30-Mar-2013 15:26:51 GMT; Path=/

However, if the server is slow to execute the response (eg on a raspberry pi :), it could generate a "wrong" date header :
Date: Sat, 30 Mar 2013 15:26:50 GMT

This means that for the next request, the client will believe the cookie is still alive :
GET /page HTTP/1.1
Cookie: cookieName=

Maybe in order to discard a cookie Play should use a fixed expire date, eg :
Set-Cookie: cookieName=; Expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/

@gissues:{"order":96.875,"status":"notstarted"}