File: tcgi1.lua

package info (click to toggle)
lua-cgi 5.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 524 kB
  • ctags: 333
  • sloc: sh: 93; makefile: 22
file content (11 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
-- $Id: tcgi1.lua,v 1.1 2004/03/25 19:31:05 tomas Exp $

io.stdout:write"Content-type: text/html\n\n"

for i,v in pairs{"QUERY_STRING", } do
	io.stdout:write (string.format ("%s = %s", v, os.getenv(v) or ' '))
end
io.stdout:write "<br>\n"

local post_data = io.stdin:read"*a"
io.stdout:write (string.format ("post_data = {%s}", post_data))