File: test_cookies.lp

package info (click to toggle)
lua-cgi 5.1.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 760 kB
  • sloc: makefile: 25
file content (13 lines) | stat: -rwxr-xr-x 314 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?lua
local cookies = require"cgilua.cookies"
CL_COOKIE = "cgilua_cookie"

local test = cookies.get (CL_COOKIE)
cookies.sethtml (CL_COOKIE, os.date())
?>

<h1>Testing Cookies library</h1>

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