<p>Hook functions are how modules (and Lua scripts) participate in the
processing of requests. Each type of hook exposed by the server exists for
-a specific purpose, such as mapping requests to the filesystem,
-performing access control, or setting mimetypes:</p>
+a specific purpose, such as mapping requests to the file system,
+performing access control, or setting mime types:</p>
<table border="1" style="zebra">
<tr>
(except for LuaAuthzProvider, which also gets passed the arguments from
the Require directive).
They can return any value, depending on the hook, but most commonly
-they'll return OK, DONE, or DECLINED, which you can write in lua as
+they'll return OK, DONE, or DECLINED, which you can write in Lua as
<code>apache2.OK</code>, <code>apache2.DONE</code>, or
<code>apache2.DECLINED</code>, or else an HTTP status code.</p>
<dd>
<p>The request_rec is mapped in as a userdata. It has a metatable
which lets you do useful things with it. For the most part it
- has the same fields as the request_rec struct, many of which are writeable as
+ has the same fields as the request_rec struct, many of which are writable as
well as readable. (The table fields' content can be changed, but the
fields themselves cannot be set to different tables.)</p>
<p>The request_rec object has (at least) the following methods:</p>
<highlight language="lua">
-r:flush() -- flushes the output buffer:
+r:flush() -- flushes the output buffer.
+ -- Returns true if the flush was successful, false otherwise.
while we_have_stuff_to_send do
r:puts("Bla bla bla\n") -- print something to client
</highlight>
<highlight language="lua">
-r:os_escape_path(file_path) -- Converts an OS path to a URL in an OS dependant way
+r:os_escape_path(file_path) -- Converts an OS path to a URL in an OS dependent way
</highlight>
<highlight language="lua">
<override>All</override>
<usage>
- <p>Specify the lifecycle scope of the Lua interpreter which will
+ <p>Specify the life cycle scope of the Lua interpreter which will
be used by handlers in this "Directory." The default is "once"</p>
<dl>