i have been going through this info posted about using lua on a server... http://www.gammon.com.au/forum/?id=6498 ...but i am having difficulty with the POST method. it seems to hang at the point where the POST data is retrieved via io.read. here is an excerpt from the "cgiutils.lua" portion...
-----begin-----
local post_length = tonumber (os.getenv ("CONTENT_LENGTH")) or 0
if os.getenv ("REQUEST_METHOD") == "POST" and post_length > 0 then
for _, v in ipairs (split (io.read (post_length), "&")) do
assemble_value (v, post_data)
end -- for
end -- if post
------end------
is there any trick when using io.read? did i miss something?
-----begin-----
local post_length = tonumber (os.getenv ("CONTENT_LENGTH")) or 0
if os.getenv ("REQUEST_METHOD") == "POST" and post_length > 0 then
for _, v in ipairs (split (io.read (post_length), "&")) do
assemble_value (v, post_data)
end -- for
end -- if post
------end------
is there any trick when using io.read? did i miss something?