File: tcgi1.lua

package info (click to toggle)
lua-cgi 6.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 956 kB
  • sloc: javascript: 2,216; makefile: 25
file content (12 lines) | stat: -rwxr-xr-x 371 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env cgilua.cgi
-- $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))