BriteSnow / snow

A Lightweight, Google Guice, Simple, and Powerful Web Application Framework that makes building modern Web Application a breeze! Fully open source, Apache V2 licensed.
http://britesnow.com/snow
29 stars 10 forks source link

Add 'persistent' param to RequestContext.setCookie, set the default to false #28

Closed jeremychone closed 11 years ago

jeremychone commented 11 years ago

Right now, the default RequestContext.setCookie store the cookie for ever (one year), however, it would be more appropriate to have a default that store it for the browser session, and add another optional parameter "persistent" when developers want the cookie to be persistent.

So,

Warning: if you used RequestContext.setCookie before, the new default is not to persist the cookie after the user close the browser. use RequestContext.setCookie(name,value,true) to have the same effect as before.