From 954c6cbaf0b914de269ae09f2d32db9f225610fc Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Mon, 29 Apr 2013 12:30:29 +0000 Subject: [PATCH] Note that parseargs and parsebody actually returns two tables, not one. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1477000 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_lua.xml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/manual/mod/mod_lua.xml b/docs/manual/mod/mod_lua.xml index 118815e67c..0ae76d93a1 100644 --- a/docs/manual/mod/mod_lua.xml +++ b/docs/manual/mod/mod_lua.xml @@ -644,18 +644,20 @@ end -r:parseargs() -- returns a Lua table containing the request's query string arguments: +r:parseargs() -- returns two tables; one standard key/value table for regular GET data, + -- and one for multi-value data (fx. foo=1&foo=2&foo=3): -local GET = r:parseargs() +local GET, GETMULTI = r:parseargs() r:puts("Your name is: " .. GET['name'] or "Unknown") -r:parsebody([sizeLimit]) -- parse the request body as a POST and return a lua table. - -- An optional number may be passed to specify the maximum number - -- of bytes to parse. Default is 8192 bytes: +r:parsebody([sizeLimit]) -- parse the request body as a POST and return two lua tables, + -- just like r:parseargs(). + -- An optional number may be passed to specify the maximum number + -- of bytes to parse. Default is 8192 bytes: -local POST = r:parsebody(1024*1024) +local POST, POSTMULTI = r:parsebody(1024*1024) r:puts("Your name is: " .. POST['name'] or "Unknown") -- 2.40.0