-- $Id: test_args.lua,v 1.1 2007/01/30 13:02:04 zhaozg Exp $
ap.print([[
请在init.lua中关闭下面的调用
if(not pcall (cgilua.getparams, _G.cgi)) then
print("getparams failed")
end
]])
req = ap.request_object()
assert (req:setup_client_block ("REQUEST_CHUNKED_ERROR") == ap.OK)
if req:should_client_block () ~= 0 then
post_data = {}
local block, err = req:get_client_block ()
while block do
table.insert (post_data, block)
block, err = req:get_client_block ()
end
if err then
error (err)
end
post_data = table.concat (post_data)
end
ap.print "post_data = {"
ap.print (tostring (post_data))
ap.print "}\n"