From aea94325065bb1ca56d213885fbcd7cf7b17ba22 Mon Sep 17 00:00:00 2001
From: Daniel Earl Poirier
Date: Sat, 1 May 2010 13:25:29 +0000
Subject: [PATCH] Add some documentation for the request record, apache2
module, some default configuration values. Indicate that mod_lua is
available in 2.3.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@940007 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/mod/mod_lua.xml | 171 +++++++++++++++++++++++++++++++++++-
1 file changed, 167 insertions(+), 4 deletions(-)
diff --git a/docs/manual/mod/mod_lua.xml b/docs/manual/mod/mod_lua.xml
index 75a1b0ebff..ebeadf2061 100644
--- a/docs/manual/mod/mod_lua.xml
+++ b/docs/manual/mod/mod_lua.xml
@@ -29,7 +29,7 @@ request processing
experimental
mod_lua.c
lua_module
-2.4 and later
+2.3 and later
Someone needs to write this.
@@ -53,8 +53,9 @@ AddHandler lua-script .lua
-This will cause any .lua
file to be evaluated by
-mod_lua
.
+This will cause mod_lua
to handle requests for files
+ending in .lua
by invoking that file's
+handle
function.
@@ -106,11 +107,153 @@ handlers (or hooks, or filters) in the same script.
which lets you do useful things with it. For the most part it
has the same fields as the request_rec struct (see httpd.h
until we get better docs here) many of which are writeable as
- well as readable, and has (at least) the following methods:
+ well as readable. (Tables' content can be changed, but the
+ field itself cannot be set to a different table.)
+
+
+
+
+ Name |
+ Lua type |
+ Writable |
+
+
+ ap_auth_type |
+ string |
+ no |
+
+
+ args |
+ string |
+ no |
+
+
+ assbackwards |
+ boolean |
+ no |
+
+
+
+ canonical_filename |
+ string |
+ no |
+
+
+ content_encoding |
+ string |
+ no |
+
+
+ content_type |
+ string |
+ yes |
+
+
+
+ document_root |
+ string |
+ no |
+
+
+ err_headers_out |
+ table |
+ no |
+
+
+ filename |
+ string |
+ yes |
+
+
+ headers_in |
+ table |
+ yes |
+
+
+ headers_out |
+ table |
+ yes |
+
+
+ hostname |
+ string |
+ no |
+
+
+ method |
+ string |
+ no |
+
+
+ notes |
+ table |
+ no |
+
+
+ path_info |
+ string |
+ no |
+
+
+ protocol |
+ string |
+ no |
+
+
+ range |
+ string |
+ no |
+
+
+ status |
+ number |
+ yes |
+
+
+ the_request |
+ string |
+ no |
+
+
+ unparsed_uri |
+ string |
+ no |
+
+
+ uri |
+ string |
+ yes |
+
+
+ user |
+ string |
+ yes |
+
+
+
+ The request_rec has (at least) the following methods:
+
+
+ r:addoutputfilter(name|function) -- add an output filter
+
+
+ r:parseargs() -- returns a lua table containing the request's
+ query string arguments
+
+
+
+ r:parsebody() -- parse the request body as a POST and return
+ a lua table
+
+
r:puts("hello", " world", "!") -- print to response body
+
+
+ r:write("a single string") -- print to response body
+
@@ -131,6 +274,24 @@ handlers (or hooks, or filters) in the same script.
+apache2 Module
+A module named apache2
is available with (at least) the following contents.
+
+ - apache2.OK
+ - internal constant OK. Handlers should return this if they've
+ handled the request.
+ - apache2.DECLINED
+ - internal constant DECLINED. Handlers should return this if
+ they are not going to handle the request.
+ - apache2.DONE
+ - internal constant DONE.
+ - apache2.version
+ - Apache HTTP server version string
+ - apache2.HTTP_MOVED_TEMPORARILY
+ - HTTP status code
+
+
+
LuaRoot
Specify the base path for resolving relative paths for mod_lua directives
@@ -152,6 +313,7 @@ handlers (or hooks, or filters) in the same script.
LuaScope
One of once, request, conn, server -- default is once
LuaScope once|request|conn|server [max|min max]
+LuaScope once
server configvirtual host
directory.htaccess
@@ -252,6 +414,7 @@ handlers (or hooks, or filters) in the same script.
LuaCodeCache
Configure the compiled code cache.
LuaCodeCache stat|forever|never
+LuaCodeCache stat
server configvirtual host
directory.htaccess
--
2.40.0