From: Daniel Gruno Date: Sun, 5 Aug 2012 20:24:21 +0000 (+0000) Subject: xforms X-Git-Tag: 2.5.0-alpha~6498 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf83f0d54340f8fdd0fd77a0d1e8bcffe59a5e31;p=thirdparty%2Fapache%2Fhttpd.git xforms git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369668 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/developer/lua.html.en b/docs/manual/developer/lua.html.en index 9ebed16313f..31f35632186 100644 --- a/docs/manual/developer/lua.html.en +++ b/docs/manual/developer/lua.html.en @@ -31,7 +31,7 @@
  • Example 1: A basic remapping module
  • Example 2: Mass virtual hosting
  • Example 3: A basic authorization hook
  • -
  • Example 4: Authorization using LuaAuthzProvider
  • +
  • Example 4: Authorization using LuaAuthzProvider
  • Example 5: Overlays using LuaMapHandler
  • Example 6: Basic Lua scripts
  • HTTPd bindings: String manipulation
  • @@ -235,7 +235,7 @@ local timeout = 60 -- Function for querying the database for saved vhost entries function query_vhosts(host) if not cached_vhosts[host] or (cached_vhosts[host] and cached_vhosts[host].updated < os.time() - timeout) then - local db = apache2.dbopen("mod_dbd") + local db = apache2.dbopen(r,"mod_dbd") local _host = db:escape(_host) local res, err = db:query( ("SELECT `destination` FROM `vhosts` WHERE `hostname` = '%s' LIMIT 1"):format(_host) ) if res and #res == 1 then @@ -345,7 +345,7 @@ end -- Function for querying the database for the account's password (stored as a salted SHA-1 hash) function fetch_password(user) if not accounts[user] or (accounts[user] and accounts[user].updated < os.time() - timeout) then - local db = apache2.dbopen("mod_dbd") + local db = apache2.dbopen(r, "mod_dbd") local usr = db:escape(user) local res, err = db:query( ("SELECT `password` FROM `accounts` WHERE `user` = '%s' LIMIT 1"):format(usr) ) if res and #res == 1 then @@ -388,7 +388,7 @@ end
    top
    -

    Example 4: Authorization using LuaAuthzProvider

    +

    Example 4: Authorization using LuaAuthzProvider

     LuaAuthzProvider rights /path/to/lua/script.lua rights_handler
    @@ -441,6 +441,7 @@ LuaMaphandler ^/portal/([a-z]+)/   /path/to/lua/script.lua handle_$1
     

    HTTPd bindings: String manipulation

    +

    apache2.base64_encode
    apache2.base64_decode @@ -459,6 +460,7 @@ LuaMaphandler ^/portal/([a-z]+)/ /path/to/lua/script.lua handle_$1
    apache2.escape_logitem
    +

    apache2.base64_decode( request_rec r,  string string ) @@ -469,7 +471,7 @@ Decodes a base64-encoded string

    Arguments: -
    +

    @@ -484,7 +486,6 @@ Decodes a base64-encoded string
    ArgumentThe string to decode
    -

    Return value(s):
    @@ -492,16 +493,14 @@ The base64-decoded string.

    Example: -
    +

     local str = "This is a test"
     local encoded = apache2.base64_encode(str)
     local decoded = apache2.base64_decode(encoded)
             
    -

    -
    -
    +

     

    apache2.base64_encode( request_rec r,  string string @@ -513,7 +512,7 @@ Encodes a string using the base64 encoding scheme.

    Arguments: -
    +

    @@ -528,19 +527,16 @@ Encodes a string using the base64 encoding scheme.
    ArgumentThe string to encode
    -

    Example: -
    +

     local str = "This is a test"
     local encoded = apache2.base64_encode(str)
     local decoded = apache2.base64_decode(encoded)
             
    -

    -
    -
    +

     

    apache2.escape( request_rec r,  string string @@ -552,7 +548,7 @@ url-escapes a string

    Arguments: -
    +

    @@ -567,7 +563,6 @@ url-escapes a string
    ArgumentThe string to escape
    -

    Return value(s):
    @@ -575,16 +570,14 @@ The URL-escaped string.

    Example: -
    +

     local str = "This is a test"
     local escaped = apache2.escape(str)
     print(escaped) -- prints "This+is+a+test"
             
    -

    -
    -
    +

     

    apache2.escape_logitem( request_rec r,  string path @@ -596,7 +589,7 @@ Escape a string for logging

    Arguments: -
    +

    @@ -611,14 +604,12 @@ Escape a string for logging
    ArgumentThe string to escape
    -

    Return value(s):
    The converted string

    -
    -
    +

     

    apache2.escapehtml( request_rec r,  string html,  boolean toasc @@ -630,7 +621,7 @@ Escapes HTML entities.

    Arguments: -
    +

    @@ -649,7 +640,6 @@ Escapes HTML entities.
    ArgumentWhether to escape all non-ASCI characters as &#nnn;
    -

    Return value(s):
    @@ -657,16 +647,14 @@ The escaped HTML code.

    Example: -
    +

     local html = "<b>Testing!</b>"
     local escaped = apache2.escapehtml(html)
     r:puts(escaped) -- prints "&lt;b&gt;Testing!&lt;/b&gt;"
             
    -

    -
    -
    +

     

    apache2.md5( request_rec r,  string string @@ -678,7 +666,7 @@ Computes an MD5 digest sum based on a string (binary safe)

    Arguments: -
    +

    @@ -693,7 +681,6 @@ Computes an MD5 digest sum based on a string (binary safe)
    ArgumentThe (binary) string to digest
    -

    Return value(s):
    @@ -701,16 +688,14 @@ The MD5 digest sum of the data provided

    Example: -
    +

     local text = "The quick brown fox jumps over the lazy dog"
     local md5 = apache2.md51(text)
     r:puts(md5) -- prints out "9e107d9d372bb6826bd81d3542a419d6"
             
    -

    -
    -
    +

     

    apache2.os_escape_path( request_rec r,  string path,  boolean partial @@ -722,7 +707,7 @@ convert an OS path to a URL in an OS dependant way.

    Arguments: -
    +

    @@ -741,7 +726,6 @@ convert an OS path to a URL in an OS dependant way.
    Argumentpartial if set, assume that the path will be appended to something with a '/' in it (and thus does not prefix "./")
    -

    Return value(s):
    @@ -749,14 +733,12 @@ The converted URL

    Example: -
    +

     local path = ap_os_escape_path("C:/foo/bar.txt")
             
    -

    -
    -
    +

     

    apache2.sha1( request_rec r,  string string @@ -768,7 +750,7 @@ Computes an SHA-1 digest sum based on a string (binary safe)

    Arguments: -
    +

    @@ -783,7 +765,6 @@ Computes an SHA-1 digest sum based on a string (binary safe)
    ArgumentThe (binary) string to digest
    -

    Return value(s):
    @@ -791,16 +772,14 @@ The SHA-1 digest sum of the data provided

    Example: -
    +

     local text = "The quick brown fox jumps over the lazy dog"
     local sha1 = apache2.sha1(text)
     r:puts(sha1) -- prints out "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
             
    -

    -
    -
    +

     

    apache2.unescape( request_rec r,  string string @@ -812,7 +791,7 @@ unescapes an URL-escaped string

    Arguments: -
    +

    @@ -827,7 +806,6 @@ unescapes an URL-escaped string
    ArgumentThe string to unescape
    -

    Return value(s):
    @@ -835,21 +813,20 @@ The URL-unescaped string

    Example: -
    +

     local str = "This+is+a+test"
     local unescaped = apache2.unescape(str)
     print(unescaped) -- prints "This is a test"
             
    -

    -
    -
    +

     

    top

    HTTPd bindings: Request handling

    +

    apache2.sendfile
    apache2.port @@ -900,6 +877,7 @@ print(unescaped) -- prints "This is a test"
    apache2.satisfies
    +

    apache2.add_input_filter( request_rec r,  string filter ) @@ -910,7 +888,7 @@ Adds an input filter to the request

    Arguments: -
    +

    @@ -925,17 +903,14 @@ Adds an input filter to the request
    ArgumentThe name of the filter handler to add
    -

    Example: -
    +

     apache2.add_input_filter(r, "SPAM_FILTER") -- Check input for spam..?
             
    -

    -
    -
    +

     

    apache2.add_output_filter( request_rec r,  string filter @@ -947,7 +922,7 @@ Adds an output filter to the request

    Arguments: -
    +

    @@ -962,17 +937,14 @@ Adds an output filter to the request
    ArgumentThe name of the filter handler to add
    -

    Example: -
    +

     apache2.add_input_filter(r, "INCLUDES") -- Turn out output into an SSI-enabled document.
             
    -

    -
    -
    +

     

    apache2.allowoverrides( request_rec r @@ -984,7 +956,7 @@ Returns the currently allowed overrides for this context (AuthCfg, Options etc)

    Arguments: -
    +

    @@ -995,7 +967,6 @@ Returns the currently allowed overrides for this context (AuthCfg, Options etc)
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    @@ -1003,7 +974,7 @@ The currently allowed overrides for this context (AuthCfg, Options etc)

    Example: -
    +

     local ctx = apache2.allowoverrides(r)
     if ctx:match("AuthCfg") then
    @@ -1011,9 +982,7 @@ if ctx:match("AuthCfg") then
     end
             
    -

    -
    -
    +

     

    apache2.auth_name( request_rec r @@ -1025,7 +994,7 @@ Returns the current Authorization realm

    Arguments: -
    +

    @@ -1036,14 +1005,12 @@ Returns the current Authorization realm
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    The current authorization realm

    -
    -
    +

     

    apache2.auth_type( request_rec r @@ -1055,7 +1022,7 @@ Returns the current authentication type used in the request

    Arguments: -
    +

    @@ -1066,14 +1033,12 @@ Returns the current authentication type used in the request
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    The current Authorization type used in the request

    -
    -
    +

     

    apache2.context_document_root( request_rec r @@ -1085,7 +1050,7 @@ Get the context_document_root for a request. This is a generalization of the doc

    Arguments: -
    +

    @@ -1096,9 +1061,7 @@ Get the context_document_root for a request. This is a generalization of the doc
    ArgumentThe mod_lua request handle
    -

    -
    -
    +

     

    apache2.context_prefix( request_rec r @@ -1110,7 +1073,7 @@ Get the context_prefix for a request. The context_prefix URI prefix maps to the

    Arguments: -
    +

    @@ -1121,9 +1084,7 @@ Get the context_prefix for a request. The context_prefix URI prefix maps to the
    ArgumentThe mod_lua request handle
    -

    -
    -
    +

     

    apache2.flush( request_rec r @@ -1135,7 +1096,7 @@ Flushes the content buffer, writing everything to the client immediately.

    Arguments: -
    +

    @@ -1146,18 +1107,15 @@ Flushes the content buffer, writing everything to the client immediately.
    ArgumentThe mod_lua request handle
    -

    Example: -
    +

     r:puts("This is buffered")
     apache2.flush(r) -- now it's written to the client.
             
    -

    -
    -
    +

     

    apache2.get_basic_auth_pw( request_rec r @@ -1169,7 +1127,7 @@ Returns the password from a basic authorization request or nil if none was suppl

    Arguments: -
    +

    @@ -1180,14 +1138,12 @@ Returns the password from a basic authorization request or nil if none was suppl
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    The password from a basic authorization request or nil if none was supplied

    -
    -
    +

     

    apache2.get_limit_req_body( request_rec r @@ -1199,7 +1155,7 @@ Returns the current request body size limit

    Arguments: -
    +

    @@ -1210,7 +1166,6 @@ Returns the current request body size limit
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    @@ -1218,15 +1173,13 @@ The current request body size limit

    Example: -
    +

     local limit = apache2.get_limit_req_body(r)
     r:puts("You can't upload files bigger than ", limit, " bytes!")
             
    -

    -
    -
    +

     

    apache2.get_server_name( @@ -1238,9 +1191,8 @@ Returns the current server name from the request

    Arguments: -
    - None

    +

    None

    Return value(s):
    @@ -1248,15 +1200,13 @@ The server name

    Example: -
    +

     local name = apache2.get_server_name(r)
     r:puts("The ServerName is set to: ", name)
             
    -

    -
    -
    +

     

    apache2.getenv( request_rec r,  string key @@ -1268,7 +1218,7 @@ Returns the value of an environment variable

    Arguments: -
    +

    @@ -1283,7 +1233,6 @@ Returns the value of an environment variable
    Argumentkey
    -

    Return value(s):
    @@ -1291,7 +1240,7 @@ The queried value

    Example: -
    +

     local env = apache2.getenv("HTTP_HOST")
     if env and env:len() > 0 then
    @@ -1299,9 +1248,7 @@ if env and env:len() > 0 then
     end
             
    -

    -
    -
    +

     

    apache2.make_etag( request_rec r,  boolean force_weak @@ -1313,7 +1260,7 @@ Constructs an entity tag from the resource information. If it's a real file, bu

    Arguments: -
    +

    @@ -1328,14 +1275,12 @@ Constructs an entity tag from the resource information. If it's a real file, bu
    Argumentforce_weak Force the entity tag to be weak - it could be modified again in as short an interval.
    -

    Return value(s):
    The entity tag

    -
    -
    +

     

    apache2.options( request_rec r @@ -1347,7 +1292,7 @@ Returns the currently allowed options for this context (Indexes, MultiViews etc)

    Arguments: -
    +

    @@ -1358,7 +1303,6 @@ Returns the currently allowed options for this context (Indexes, MultiViews etc)
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    @@ -1366,7 +1310,7 @@ The currently allowed options for this context.

    Example: -
    +

     local ctx = apache2.options(r)
     if ctx:match("MultiViews") then
    @@ -1374,9 +1318,7 @@ if ctx:match("MultiViews") then
     end
             
    -

    -
    -
    +

     

    apache2.port( request_rec r @@ -1388,7 +1330,7 @@ Returns the port currently being used by the request

    Arguments: -
    +

    @@ -1399,7 +1341,6 @@ Returns the port currently being used by the request
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    @@ -1407,15 +1348,13 @@ The current port used by the request

    Example: -
    +

     local port = apache2.port(r)
     r:puts("We are listening on port ", port)
             
    -

    -
    -
    +

     

    apache2.request_has_body( request_rec r @@ -1427,7 +1366,7 @@ Returns true if the request has a body(POST/PUT), false otherwise

    Arguments: -
    +

    @@ -1438,7 +1377,6 @@ Returns true if the request has a body(POST/PUT), false otherwise
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    @@ -1446,16 +1384,14 @@ True if the request has a body(POST/PUT), false otherwise

    Example: -
    +

     if apache2.request_has_body(r) then
         -- do stuff with the req body
     end
             
    -

    -
    -
    +

     

    apache2.requestbody( request_rec r,  string filename @@ -1467,7 +1403,7 @@ Reads the request body. If a filename is specified, the request body will be wri

    Arguments: -
    +

    @@ -1482,7 +1418,6 @@ Reads the request body. If a filename is specified, the request body will be wri
    Argumentfilename
    -

    Return value(s):
    @@ -1490,7 +1425,7 @@ The number of bytes written if a filename was specified, otherwise it returns th

    Example: -
    +

     if tonumber(r.headers_in['Content-Length'] or 0) < 10000 then
         local smallfile = apache2.requestbody(r) -- fetch a small file into memory
    @@ -1501,9 +1436,7 @@ else
     end
             
    -

    -
    -
    +

     

    apache2.satisfies( request_rec r @@ -1515,7 +1448,7 @@ Returns how the requires lines must be met.

    Arguments: -
    +

    @@ -1526,7 +1459,6 @@ Returns how the requires lines must be met.
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    @@ -1534,7 +1466,7 @@ How the requirements must be met (SATISFY_ANY, SATISFY_ALL, SATISFY_NOSPEC).

    Example: -
    +

     local how = apache2.satisfies(r)
     if how == "SATISFY_ANY" then
    @@ -1542,9 +1474,7 @@ if how == "SATISFY_ANY" then
     end
             
    -

    -
    -
    +

     

    apache2.send_interim_response( request_rec r,  boolean send_headers @@ -1556,7 +1486,7 @@ Sends an interim (HTTP 1xx) response immediately.

    Arguments: -
    +

    @@ -1571,17 +1501,14 @@ Sends an interim (HTTP 1xx) response immediately.
    Argumentsend_headers Whether to send&clear headers in r->headers_out
    -

    Example: -
    +

     apache2.send_interim_response(r, false)
             
    -

    -
    -
    +

     

    apache2.sendfile( request_rec r,  string filename @@ -1593,7 +1520,7 @@ Sends a file to the client via sendfile() if possible.

    Arguments: -
    +

    @@ -1608,17 +1535,14 @@ Sends a file to the client via sendfile() if possible.
    ArgumentThe file to send
    -

    Example: -
    +

     apache2.sendfile(r, "/foo/bar/test.png") -- sends /foo/bar/test.png via sendfile
             
    -

    -
    -
    +

     

    apache2.set_context_prefix( request_rec r,  string prefix,  string document @@ -1630,7 +1554,7 @@ Set context_prefix and context_document_root for a request.

    Arguments: -
    +

    @@ -1649,9 +1573,7 @@ Set context_prefix and context_document_root for a request.
    ArgumentThe corresponding directory on disk, without trailing slash
    -

    -
    -
    +

     

    apache2.set_document_root( request_rec r,  string root @@ -1663,7 +1585,7 @@ Sets the document root of the request.

    Arguments: -
    +

    @@ -1678,10 +1600,9 @@ Sets the document root of the request.
    Argumentroot
    -

    Example: -
    +

     -- Suppose our real document root is /var/bar, then...
     if r.hostname == "www.foo.com" then
    @@ -1689,9 +1610,7 @@ if r.hostname == "www.foo.com" then
     end
             
    -

    -
    -
    +

     

    apache2.set_keepalive( request_rec r @@ -1703,7 +1622,7 @@ Sets the keepalive status for this request

    Arguments: -
    +

    @@ -1714,14 +1633,12 @@ Sets the keepalive status for this request
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    True if keepalive can be set, false otherwise

    -
    -
    +

     

    apache2.setenv( request_rec r,  string key,  string val @@ -1733,7 +1650,7 @@ Sets the value of an environment variable

    Arguments: -
    +

    @@ -1752,17 +1669,14 @@ Sets the value of an environment variable
    Argumentval
    -

    Example: -
    +

     apache2.setenv("FOO_VAL", "bar and stuff")
             
    -

    -
    -
    +

     

    apache2.some_auth_required( request_rec r @@ -1774,7 +1688,7 @@ Returns true if authorization is required for this request

    Arguments: -
    +

    @@ -1785,7 +1699,6 @@ Returns true if authorization is required for this request
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    @@ -1793,27 +1706,27 @@ True if auth is required, false if not.

    Example: -
    +

     if apache2.some_auth_required(r) then
         print("debug: auth is required for this request\n")
     end
             
    -

    -
    -
    +

     

    top

    HTTPd bindings: Parser functions

    +

    apache2.expr
    apache2.regex
    apache2.strcmp_match
    +

    apache2.expr( request_rec r,  string expression ) @@ -1824,7 +1737,7 @@ Evaluates an ap_expr (think <If ...>) expression and returns true if the e

    Arguments: -
    +

    @@ -1839,7 +1752,6 @@ Evaluates an ap_expr (think <If ...>) expression and returns true if the e
    Argumentexpression
    -

    Return value(s):
    @@ -1847,16 +1759,14 @@ True if the expression evaluates as true, false if the expression doesn't evalua

    Example: -
    +

     if apache2.expr("%{REQUEST_URI} =~ /force-gzip") then
         apache2.add_output_filter(r, "DEFLATE")
     end
             
    -

    -
    -
    +

     

    apache2.regex( request_rec r,  string expression,  string source @@ -1868,7 +1778,7 @@ Evaluates a regular expression and, if it matches the source string, captures th

    Arguments: -
    +

    @@ -1887,7 +1797,6 @@ Evaluates a regular expression and, if it matches the source string, captures th
    Argumentthe source string to capture from
    -

    Return value(s):
    @@ -1895,7 +1804,7 @@ True if the expression evaluates as true, false if the expression doesn't evalua

    Example: -
    +

     local matches = apache2.regex(r, [[(\S+) kitty]], "Hello kitty")
     if matches and matches[1] then 
    @@ -1903,9 +1812,7 @@ if matches and matches[1] then
     end
             
    -

    -
    -
    +

     

    apache2.strcmp_match( string str,  string expexted,  boolean ignoreCase @@ -1917,7 +1824,7 @@ Determines if a string matches a pattern containing the wildcards '?' or '*'

    Arguments: -
    +

    @@ -1936,7 +1843,6 @@ Determines if a string matches a pattern containing the wildcards '?' or '*'
    ArgumentWhether to ignore case when matching
    -

    Return value(s):
    @@ -1944,21 +1850,20 @@ True if the two strings match, false otherwise.

    Example: -
    +

     if apache2.strcmp_match("foo.bar", "foo.*") then
         r:puts("It matches!")
     end
             
    -

    -
    -
    +

     

    top

    HTTPd bindings: Server settings

    +

    apache2.add_version_component
    apache2.banner @@ -1991,6 +1896,7 @@ end
    apache2.exists_config_define
    +

    apache2.add_version_component( request_rec r,  string component ) @@ -2001,7 +1907,7 @@ Adds a component to the server description and banner strings

    Arguments: -
    +

    @@ -2016,19 +1922,16 @@ Adds a component to the server description and banner strings
    ArgumentThe component to add
    -

    Example: -
    +

     if not apache2.banner():match("FooModule") then -- Make sure we haven't added it already
         apache2.add_version_component(r, "FooModule/1.0")
     end
             
    -

    -
    -
    +

     

    apache2.banner( @@ -2040,16 +1943,14 @@ Returns the server banner

    Arguments: -
    - None

    +

    None

    Return value(s):
    The server banner

    -
    -
    +

     

    apache2.custom_response( request_rec r,  number status,  string string @@ -2061,7 +1962,7 @@ Install a custom response handler for a given status

    Arguments: -
    +

    @@ -2080,17 +1981,14 @@ Install a custom response handler for a given status
    ArgumentThe custom response. This can be a static string, a file or a URL
    -

    Example: -
    +

     apache2.custom_response(r, 404, "Not found!!")
             
    -

    -
    -
    +

     

    apache2.exists_config_define( string name @@ -2102,7 +2000,7 @@ Checks for a definition from the server command line

    Arguments: -
    +

    @@ -2113,19 +2011,16 @@ Checks for a definition from the server command line
    ArgumentThe define to check for
    -

    Example: -
    +

     if apache2.exists_config_define("FOO") then
         r:puts("This server was started with -DFOO")
     end
             
    -

    -
    -
    +

     

    apache2.get_server_built( @@ -2137,16 +2032,14 @@ Returns the date the server was built

    Arguments: -
    - None

    +

    None

    Return value(s):
    The date the server was built

    -
    -
    +

     

    apache2.is_initial_req( request_rec r @@ -2158,7 +2051,7 @@ Returns true if this is the main request, false if it is a sub-request

    Arguments: -
    +

    @@ -2169,14 +2062,12 @@ Returns true if this is the main request, false if it is a sub-request
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    True if this is the main request, false if it is a sub-request

    -
    -
    +

     

    apache2.loaded_modules( @@ -2188,16 +2079,14 @@ Returns a table containing the name (c filename) of all loaded modules

    Arguments: -
    - None

    +

    None

    Return value(s):
    A table containing the name (c filename) of all loaded modules

    -
    -
    +

     

    apache2.module_info( string c,  string file @@ -2209,7 +2098,7 @@ Returns information about a specific module (if loaded)

    Arguments: -
    +

    @@ -2224,14 +2113,12 @@ Returns information about a specific module (if loaded)
    Argumentfile
    -

    Return value(s):
    The various commands available to this module as a table, or nil if the module wasn't found.

    -
    -
    +

     

    apache2.mpm_query( number i @@ -2243,7 +2130,7 @@ Queries the MPM for a specific value

    Arguments: -
    +

    @@ -2254,14 +2141,12 @@ Queries the MPM for a specific value
    Argumenti
    -

    Return value(s):
    The queried value

    -
    -
    +

     

    apache2.runtime_dir_relative( request_rec r,  string file @@ -2273,7 +2158,7 @@ Returns the path of a file relative to the default runtime directory

    Arguments: -
    +

    @@ -2288,14 +2173,12 @@ Returns the path of a file relative to the default runtime directory
    Argumentfile
    -

    Return value(s):
    The path of a file relative to the default runtime directory

    -
    -
    +

     

    apache2.scoreboard_process( request_rec r,  number child @@ -2307,7 +2190,7 @@ Returns the scoreboard for a server daemon as a table

    Arguments: -
    +

    @@ -2322,14 +2205,12 @@ Returns the scoreboard for a server daemon as a table
    ArgumentThe server child to query
    -

    Return value(s):
    The scoreboard for a server daemon as a table

    -
    -
    +

     

    apache2.scoreboard_worker( request_rec r,  number child,  number thread @@ -2341,7 +2222,7 @@ Returns the scoreboard for a single thread as a table

    Arguments: -
    +

    @@ -2360,14 +2241,12 @@ Returns the scoreboard for a single thread as a table
    ArgumentThe thread to query
    -

    Return value(s):
    The scoreboard for a single thread as a table

    -
    -
    +

     

    apache2.server_info( @@ -2379,16 +2258,14 @@ Returns a table with information about the server program

    Arguments: -
    - None

    +

    None

    Return value(s):
    A table with information about the server program

    -
    -
    +

     

    apache2.started( request_rec r @@ -2400,7 +2277,7 @@ Returns the time when the server was (re)started

    Arguments: -
    +

    @@ -2411,14 +2288,12 @@ Returns the time when the server was (re)started
    ArgumentThe mod_lua request handle
    -

    Return value(s):
    The time when the server was (re)started

    -
    -
    +

     

    apache2.state_query( number field @@ -2430,7 +2305,7 @@ Query the server for some state information

    Arguments: -
    +

    @@ -2441,18 +2316,15 @@ Query the server for some state information
    ArgumentWhich information is requested
    -

    Example: -
    +

     local gen = apache2.state_query(2)
     r:puts("This is generation no. " .. gen .. " of the top-level parent")
             
    -

    -
    -
    +

     

    apache2.terminate( @@ -2464,16 +2336,15 @@ Kills off a server process. This has no other use than to show how dangerous mod

    Arguments: -
    - None

    -
    -
    +

    None

    +

     

    top

    HTTPd bindings: Database connectivity

    +

    apache2.dbopen
    db:query @@ -2482,17 +2353,18 @@ Kills off a server process. This has no other use than to show how dangerous mod
    db:close
    +

    apache2.dbopen( request_rec r,  string dbtype,  string conn_string )

    -Opens up a new database connection. See the DB functions for mod_pLua for more info on this. +Opens up a new database connection.

    Arguments: -
    +

    @@ -2511,7 +2383,6 @@ Opens up a new database connection. See the DB functions for mod_pLua for more i
    Argumentconnection string
    -

    Return value(s):
    @@ -2519,7 +2390,7 @@ The database connection as a table with functions, or nil if the connection fail

    Example: -
    +

     local db, error = apache2.dbopen(r, "mod_dbd")
     if error then
    @@ -2529,9 +2400,7 @@ else
     end
             
    -

    -
    -
    +

     

    db:close( request_rec r @@ -2543,7 +2412,7 @@ Closes a database connection

    Arguments: -
    +

    @@ -2554,18 +2423,15 @@ Closes a database connection
    ArgumentThe mod_lua request handle
    -

    Example: -
    +

     local db = apache2.dbopen(r, "mod_dbd") -- open a db connection
     db:close() -- close it down
             
    -

    -
    -
    +

     

    db:do( request_rec r,  string query @@ -2577,7 +2443,7 @@ Executes a statement that doesn't return a result set

    Arguments: -
    +

    @@ -2592,7 +2458,6 @@ Executes a statement that doesn't return a result set
    ArgumentThe SQL statement to execute
    -

    Return value(s):
    @@ -2600,7 +2465,7 @@ If the statement is valid, a table of results are returned. If an error occurred

    Example: -
    +

     local db = apache2.dbopen(r, "mod_dbd")
     local affected = db:do("DELETE FROM `table` WHERE 1")
    @@ -2609,9 +2474,7 @@ if affected then
     end
             
    -

    -
    -
    +

     

    db:query( request_rec r,  string query @@ -2623,7 +2486,7 @@ Queries the database for information using the specified statement.

    Arguments: -
    +

    @@ -2638,7 +2501,6 @@ Queries the database for information using the specified statement.
    ArgumentThe SQL statement to execute
    -

    Return value(s):
    @@ -2646,7 +2508,7 @@ If the statement is valid, a table of results are returned. If an error occurred

    Example: -
    +

     local db = apache2.dbopen(r, "mod_dbd")
     local result, error = db:query("SELECT * FROM `table` WHERE 1")
    @@ -2657,18 +2519,18 @@ if result then
     end
             
    -

    -
    -
    +

     

    top
    diff --git a/docs/manual/mod/mod_cgid.html.en b/docs/manual/mod/mod_cgid.html.en index 21b8662d8e0..637d23b7149 100644 --- a/docs/manual/mod/mod_cgid.html.en +++ b/docs/manual/mod/mod_cgid.html.en @@ -79,7 +79,7 @@ Description:The filename prefix of the socket to use for communication with the cgi daemon Syntax:ScriptSock file-path -Default:ScriptSock logs/cgisock +Default:ScriptSock cgisock Context:server config Status:Base Module:mod_cgid @@ -92,6 +92,10 @@ the cgi daemon scripts, it is important that no other user has permission to write in the directory where the socket is located.

    +

    If file-path is not an absolute path, the location specified + will be relative to the value of + DefaultRuntimeDir.

    +

    Example

           ScriptSock /var/run/cgid.sock
         
    diff --git a/docs/manual/mod/mod_cgid.xml.ja b/docs/manual/mod/mod_cgid.xml.ja index b90ee25bb49..ea8405b3303 100644 --- a/docs/manual/mod/mod_cgid.xml.ja +++ b/docs/manual/mod/mod_cgid.xml.ja @@ -1,7 +1,7 @@ - + + + diff --git a/docs/manual/mod/mod_ssl.html.en b/docs/manual/mod/mod_ssl.html.en index 69f1627c350..dbac3ca93e9 100644 --- a/docs/manual/mod/mod_ssl.html.en +++ b/docs/manual/mod/mod_ssl.html.en @@ -2490,4 +2490,4 @@ if (typeof(prettyPrint) !== 'undefined') { prettyPrint(); } //--> - + \ No newline at end of file diff --git a/docs/manual/mod/quickreference.html.de b/docs/manual/mod/quickreference.html.de index 0b6487c3a4c..ef196dd7b20 100644 --- a/docs/manual/mod/quickreference.html.de +++ b/docs/manual/mod/quickreference.html.de @@ -604,7 +604,7 @@ processing LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn -- default is once +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life MaxKeepAliveRequests Anzahl 100 svCAnzahl der Anfragen, die bei einer persistenten Verbindung @@ -845,7 +845,7 @@ CGI-Skripten ScriptLogBuffer bytes 1024 svBMaximum amount of PUT or POST requests that will be recorded in the scriptlog ScriptLogLength bytes 10385760 svBSize limit of the CGI script logfile -ScriptSock file-path logs/cgisock sBThe filename prefix of the socket to use for communication with +ScriptSock file-path cgisock sBThe filename prefix of the socket to use for communication with the cgi daemon SecureListen [IP-address:]portnumber Certificate-Name [MUTUAL]sBEnables SSL encryption for the specified port diff --git a/docs/manual/mod/quickreference.html.en b/docs/manual/mod/quickreference.html.en index 887db14a0a9..039b9809b07 100644 --- a/docs/manual/mod/quickreference.html.en +++ b/docs/manual/mod/quickreference.html.en @@ -596,7 +596,7 @@ processing LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn, thread -- default is once +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life MaxKeepAliveRequests number 100 svCNumber of requests allowed on a persistent @@ -833,7 +833,7 @@ scripts ScriptLogBuffer bytes 1024 svBMaximum amount of PUT or POST requests that will be recorded in the scriptlog ScriptLogLength bytes 10385760 svBSize limit of the CGI script logfile -ScriptSock file-path logs/cgisock sBThe filename prefix of the socket to use for communication with +ScriptSock file-path cgisock sBThe filename prefix of the socket to use for communication with the cgi daemon SecureListen [IP-address:]portnumber Certificate-Name [MUTUAL]sBEnables SSL encryption for the specified port diff --git a/docs/manual/mod/quickreference.html.es b/docs/manual/mod/quickreference.html.es index 78947942a76..29240ddd3f9 100644 --- a/docs/manual/mod/quickreference.html.es +++ b/docs/manual/mod/quickreference.html.es @@ -603,7 +603,7 @@ processing LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn -- default is once +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life MaxKeepAliveRequests number 100 svCNumber of requests allowed on a persistent @@ -824,7 +824,7 @@ by Apache httpd children processes launched by Apache httpd children Satisfy Any|All All dhEInteraction between host-level access control and user authentication -ScoreBoardFile file-path logs/apache_status sMLocation of the file used to store coordination data for +ScoreBoardFile file-path apache_runtime_stat +sMLocation of the file used to store coordination data for the child processes Script method cgi-scriptsvdBActivates a CGI script for a particular request method. @@ -840,7 +840,7 @@ scripts ScriptLogBuffer bytes 1024 svBMaximum amount of PUT or POST requests that will be recorded in the scriptlog ScriptLogLength bytes 10385760 svBSize limit of the CGI script logfile -ScriptSock file-path logs/cgisock sBThe filename prefix of the socket to use for communication with +ScriptSock file-path cgisock sBThe filename prefix of the socket to use for communication with the cgi daemon SecureListen [IP-address:]portnumber Certificate-Name [MUTUAL]sBEnables SSL encryption for the specified port diff --git a/docs/manual/mod/quickreference.html.ja.utf8 b/docs/manual/mod/quickreference.html.ja.utf8 index c27b963e40c..b761300bb98 100644 --- a/docs/manual/mod/quickreference.html.ja.utf8 +++ b/docs/manual/mod/quickreference.html.ja.utf8 @@ -569,7 +569,7 @@ processing LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn -- default is once +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life MaxKeepAliveRequests number 100 svC持続的な接続上で許可されるリクエストの数 diff --git a/docs/manual/mod/quickreference.html.ko.euc-kr b/docs/manual/mod/quickreference.html.ko.euc-kr index 02dd468847b..f636d909de5 100644 --- a/docs/manual/mod/quickreference.html.ko.euc-kr +++ b/docs/manual/mod/quickreference.html.ko.euc-kr @@ -566,7 +566,7 @@ processing LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn -- default is once +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life MaxKeepAliveRequests number 100 svCNumber of requests allowed on a persistent @@ -784,7 +784,7 @@ by Apache httpd children processes launched by Apache httpd children Satisfy Any|All All dhEInteraction between host-level access control and user authentication -ScoreBoardFile file-path logs/apache_status sMLocation of the file used to store coordination data for +ScoreBoardFile file-path apache_runtime_stat +sMLocation of the file used to store coordination data for the child processes Script method cgi-scriptsvdBƯÁ¤ ¿äû¸Þ¼­µå¿¡ ´ëÇØ CGI ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÑ´Ù. diff --git a/docs/manual/mod/quickreference.html.tr.utf8 b/docs/manual/mod/quickreference.html.tr.utf8 index 08a0f29d497..84fab00671e 100644 --- a/docs/manual/mod/quickreference.html.tr.utf8 +++ b/docs/manual/mod/quickreference.html.tr.utf8 @@ -597,7 +597,7 @@ processing LuaPackagePath /path/to/include/?.luaskdhDAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_nameskDProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directoryskdhDSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once skdhDOne of once, request, conn -- default is once +LuaScope once|request|conn|thread|server [min] [max] once skdhDOne of once, request, conn, thread -- default is once MaxConnectionsPerChild sayı 0 sMTek bir çocuk sürecin ömrü boyunca işleme sokabileceği istek sayısını sınırlamakta kullanılır. MaxKeepAliveRequests sayı 100 skÇBir kalıcı bağlantıda izin verilen istek sayısı @@ -830,7 +830,7 @@ eşler ve hedefi bir CGI betiği olarak çalıştırır. ScriptLogBuffer bytes 1024 skTMaximum amount of PUT or POST requests that will be recorded in the scriptlog ScriptLogLength bytes 10385760 skTSize limit of the CGI script logfile -ScriptSock file-path logs/cgisock sTThe filename prefix of the socket to use for communication with +ScriptSock file-path cgisock sTThe filename prefix of the socket to use for communication with the cgi daemon SecureListen [IP-address:]portnumber Certificate-Name [MUTUAL]sTEnables SSL encryption for the specified port diff --git a/docs/manual/mod/quickreference.html.zh-cn b/docs/manual/mod/quickreference.html.zh-cn index 68419b90b35..5bdae2a02af 100644 --- a/docs/manual/mod/quickreference.html.zh-cn +++ b/docs/manual/mod/quickreference.html.zh-cn @@ -591,7 +591,7 @@ processing LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn -- default is once +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life MaxKeepAliveRequests number 100 svCNumber of requests allowed on a persistent @@ -812,7 +812,7 @@ by Apache httpd children processes launched by Apache httpd children Satisfy Any|All All dhEInteraction between host-level access control and user authentication -ScoreBoardFile file-path logs/apache_status sMLocation of the file used to store coordination data for +ScoreBoardFile file-path apache_runtime_stat +sMLocation of the file used to store coordination data for the child processes Script method cgi-scriptsvdBActivates a CGI script for a particular request method. @@ -828,7 +828,7 @@ scripts ScriptLogBuffer bytes 1024 svBMaximum amount of PUT or POST requests that will be recorded in the scriptlog ScriptLogLength bytes 10385760 svBSize limit of the CGI script logfile -ScriptSock file-path logs/cgisock sBThe filename prefix of the socket to use for communication with +ScriptSock file-path cgisock sBThe filename prefix of the socket to use for communication with the cgi daemon SecureListen [IP-address:]portnumber Certificate-Name [MUTUAL]sBEnables SSL encryption for the specified port