You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2013/04/29 14:30:29 UTC

svn commit: r1477000 - /httpd/httpd/trunk/docs/manual/mod/mod_lua.xml

Author: humbedooh
Date: Mon Apr 29 12:30:29 2013
New Revision: 1477000

URL: http://svn.apache.org/r1477000
Log:
Note that parseargs and parsebody actually returns two tables, not one.

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_lua.xml

Modified: httpd/httpd/trunk/docs/manual/mod/mod_lua.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_lua.xml?rev=1477000&r1=1476999&r2=1477000&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_lua.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_lua.xml Mon Apr 29 12:30:29 2013
@@ -644,18 +644,20 @@ end
 </highlight>
 
 <highlight language="lua">
-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&amp;foo=2&amp;foo=3):
 
-local GET = r:parseargs()
+local GET, GETMULTI = r:parseargs()
 r:puts("Your name is: " .. GET['name'] or "Unknown")
 </highlight>
 
 <highlight language="lua">
-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")
 </highlight>