File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / axTLS / www / lua / test_cookies.lua
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Fri Sep 28 11:55:55 2012 UTC (12 years, 6 months ago) by misho
Branches: v1_4_8, MAIN
CVS tags: datecs, HEAD
axTLS

local cookies = require"cgilua.cookies"
CL_COOKIE = "cgilua_cookie"

local test = cookies.get (CL_COOKIE)
cookies.set (CL_COOKIE, os.date())

cgilua.htmlheader ()
cgilua.put ([[
<h1>Testing Cookies library</h1>

]]..CL_COOKIE..'  = '..tostring(test)..[[<br>
Assigning current date to cookie!<br>
Reload this script to check cookie's value!
]])

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>