cloudflare / lua-resty-cookie

Lua library for HTTP cookie manipulations for OpenResty/ngx_lua
347 stars 160 forks source link

[Question]Do we need to convert the time when set cookie? #29

Closed hchenxa closed 5 years ago

hchenxa commented 5 years ago

From the doc https://github.com/cloudflare/lua-resty-cookie/blob/master/README.md#set, when set cookie with expires time, it need to transfer the time to cookie.time() first which was not same like nginx-sticky-module-ng did. refer https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/overview.

The question was, Do I need to calculate the expires time before set cookie? and does there have any lua module can parse the time like ngx_parse.c did(https://www.cnblogs.com/xiangnan/p/5647115.html).

@agentzh