Rework LuCI build system
[project/luci.git] / libs / luci-lib-nixio / axTLS / www / lua / test_cookies.lua
diff --git a/libs/luci-lib-nixio/axTLS/www/lua/test_cookies.lua b/libs/luci-lib-nixio/axTLS/www/lua/test_cookies.lua
new file mode 100644 (file)
index 0000000..6af935e
--- /dev/null
@@ -0,0 +1,14 @@
+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!
+]])