Mercurial Hosting > luan
changeset 1156:3839ecc130ea
cookie fixes
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 04 Feb 2018 23:18:51 -0700 |
parents | 4100304340bc |
children | 50879022f49d |
files | src/luan/modules/http/Http.luan |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/luan/modules/http/Http.luan Sun Feb 04 20:53:07 2018 -0700 +++ b/src/luan/modules/http/Http.luan Sun Feb 04 23:18:51 2018 -0700 @@ -100,16 +100,16 @@ HttpServicer.setCookie(Http.request.java,this.java,name,value,attributes) end - function this.set_persistent_cookie(name,value,attributes) { + function this.set_persistent_cookie(name,value,attributes) attributes = attributes or {} attributes["Max-Age"] = "10000000" this.set_cookie(name,value,attributes) - } + end - function this.remove_cookie(name,domain) + function this.remove_cookie(name,attributes) attributes = attributes or {} attributes["Max-Age"] = "0" - this.set_cookie(name,value,attributes) + this.set_cookie(name,"delete",attributes) end function this.set()