]> granicus.if.org Git - apache/blobdiff - docs/manual/mod/mod_lua.html.en
rebuild docs
[apache] / docs / manual / mod / mod_lua.html.en
index 246d39662dbb123e76a6c48aee0d83b7b7ecfe95..bbe0d19530216bfe106cbe77ba348de36d9613b6 100644 (file)
@@ -105,9 +105,12 @@ trust, as it can be abused to change the internal workings of httpd.</p>
 
 <p>
 <code>mod_lua</code> provides a handler named <code>lua-script</code>,
-which can be used with an <code>AddHandler</code> directive:</p>
+which can be used with an <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code>
+or <code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code> directive:</p>
 
-<pre class="prettyprint lang-config">AddHandler lua-script .lua</pre>
+<pre class="prettyprint lang-config">&lt;Files *.lua&gt;
+    SetHandler lua-script .lua
+&lt;/Files&gt;</pre>
 
 
 <p>
@@ -1170,7 +1173,8 @@ local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1")
 
 local rows = result(0) -- Fetch ALL rows synchronously
 local row = result(-1) -- Fetch the next available row, asynchronously
-local row = result(1234) -- Fetch row number 1234, asynchronously</pre>
+local row = result(1234) -- Fetch row number 1234, asynchronously
+local row = result(-1, true) -- Fetch the next available row, using row names as key indexes.</pre>
 
     <p>One can construct a function that returns an iterative function to iterate over all rows 
     in a synchronous or asynchronous way, depending on the async argument:
@@ -1609,7 +1613,7 @@ end</pre>
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.5.0 and later</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.5 and later</td></tr>
 </table>
 <p>Provides a means of adding a Lua function as an input filter. 
 As with output filters, input filters work as coroutines, 
@@ -1621,9 +1625,9 @@ onto the Lua script:
 </p>
 
 <pre class="prettyprint lang-config">LuaInputFilter myInputFilter /www/filter.lua input_filter
-&lt;FilesMatch "\.lua&gt;
+&lt;Files *.lua&gt;
   SetInputFilter myInputFilter
-&lt;/FilesMatch&gt;</pre>
+&lt;/Files&gt;</pre>
 
 <pre class="prettyprint lang-lua">--[[
     Example input filter that converts all POST data to uppercase.
@@ -1694,7 +1698,7 @@ filters</a>" for more information.
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_lua</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.5.0 and later</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.5 and later</td></tr>
 </table>
 <p>Provides a means of adding a Lua function as an output filter. 
 As with input filters, output filters work as coroutines, 
@@ -1706,9 +1710,9 @@ onto the Lua script:
 </p>
 
 <pre class="prettyprint lang-config">LuaOutputFilter myOutputFilter /www/filter.lua output_filter
-&lt;FilesMatch "\.lua&gt;
+&lt;Files *.lua&gt;
   SetOutputFilter myOutputFilter
-&lt;/FilesMatch&gt;</pre>
+&lt;/Files&gt;</pre>
 
 <pre class="prettyprint lang-lua">--[[
     Example output filter that escapes all HTML entities in the output