summaryrefslogtreecommitdiffstats
path: root/docs/manual
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2011-08-05 20:38:18 +0200
committerStefan Fritsch <sf@apache.org>2011-08-05 20:38:18 +0200
commitddac67818e0c66450fb1dfd8e9a637b1582b3872 (patch)
treee080acd2331ec22ba867e17d9733d9bea0720f1d /docs/manual
parentmod_proxy_http, mod_proxy_connect: Add 'proxy-status' and 'proxy-source-port' (diff)
downloadapache2-ddac67818e0c66450fb1dfd8e9a637b1582b3872.tar.xz
apache2-ddac67818e0c66450fb1dfd8e9a637b1582b3872.zip
update xforms
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154344 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual')
-rw-r--r--docs/manual/mod/core.xml.de2
-rw-r--r--docs/manual/mod/core.xml.ja2
-rw-r--r--docs/manual/mod/core.xml.tr2
-rw-r--r--docs/manual/mod/mod_lua.html.en55
-rw-r--r--docs/manual/mod/mod_proxy_connect.html.en19
-rw-r--r--docs/manual/mod/mod_proxy_connect.xml.ja2
-rw-r--r--docs/manual/mod/mod_proxy_http.html.en15
7 files changed, 85 insertions, 12 deletions
diff --git a/docs/manual/mod/core.xml.de b/docs/manual/mod/core.xml.de
index 2af2c56e0f..21fc560393 100644
--- a/docs/manual/mod/core.xml.de
+++ b/docs/manual/mod/core.xml.de
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.de.xsl"?>
-<!-- English Revision: 344972:1153497 (outdated) -->
+<!-- English Revision: 344972:1153500 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
diff --git a/docs/manual/mod/core.xml.ja b/docs/manual/mod/core.xml.ja
index 6b568a2dfd..fa3a68f7e6 100644
--- a/docs/manual/mod/core.xml.ja
+++ b/docs/manual/mod/core.xml.ja
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 669847:1153497 (outdated) -->
+<!-- English Revision: 669847:1153500 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
diff --git a/docs/manual/mod/core.xml.tr b/docs/manual/mod/core.xml.tr
index 1697b08ba7..3e36899dbf 100644
--- a/docs/manual/mod/core.xml.tr
+++ b/docs/manual/mod/core.xml.tr
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 813376:1153497 (outdated) -->
+<!-- English Revision: 813376:1153500 (outdated) -->
<!-- =====================================================
Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
Reviewed by: Orhan Berent <berent belgeler.org>
diff --git a/docs/manual/mod/mod_lua.html.en b/docs/manual/mod/mod_lua.html.en
index 3fc9050283..adcd002e14 100644
--- a/docs/manual/mod/mod_lua.html.en
+++ b/docs/manual/mod/mod_lua.html.en
@@ -31,9 +31,15 @@ request processing</td></tr>
<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>2.3 and later</td></tr></table>
<h3>Summary</h3>
-<p>Someone needs to write this.
-Include a link to <a href="http://www.lua.org/">the Lua website</a>.
-</p>
+<p>This module allows the server to be extended with scripts written in the
+Lua programming language. The extension points (hooks) available with
+<code class="module"><a href="../mod/mod_lua.html">mod_lua</a></code> include many of the hooks available to
+natively compiled Apache HTTP Server modules, such as mapping requests to
+files, generating dynamic responses, access control, authentication, and
+authorization</p>
+
+<p>More information on the Lua programming language can be found at the
+<a href="http://www.lua.org/">the Lua website</a>.</p>
<div class="note"><code>mod_lua</code> is still in experimental state.
Until it is declared stable, usage and behavior may change
@@ -97,8 +103,12 @@ ending in <code>.lua</code> by invoking that file's
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="writinghandlers" id="writinghandlers">Writing Handlers</a></h2>
+<p> In the Apache HTTP Server API, the handler is a specific kind of hook
+responsible for generating the response. Examples of modules that include a
+handler are <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>,
+and <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>.</p>
-<p><code>mod_lua</code> always looks to invoke a function for the handler, rather than
+<p><code>mod_lua</code> always looks to invoke a Lua function for the handler, rather than
just evaluating a script body CGI style. A handler function looks
something like this:</p>
@@ -107,7 +117,12 @@ something like this:</p>
require "string"
-function handle_something(r)
+--[[
+ This is the default method name for Lua handlers, see the optional
+ function-name in the LuaMapHandler directive to choose a different
+ entry point.
+--]]
+function handle(r)
r.content_type = "text/plain"
r:puts("Hello Lua World!\n")
@@ -139,6 +154,12 @@ handlers (or hooks, or filters) in the same script.
<div class="section">
<h2><a name="writinghooks" id="writinghooks">Writing Hooks</a></h2>
+<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 purposes such as mapping requests to the filesystem,
+performing access control, or setting mimetypes. General purpose hooks
+that simply run at handy times in the request lifecycle exist as well.</p>
+
<p>Hook functions are passed the request object as their only argument.
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
@@ -146,7 +167,29 @@ they'll return OK, DONE, or DECLINED, which you can write in lua as
<code>apache2.DECLINED</code>, or else an HTTP status code.</p>
<div class="example"><h3>translate_name.lua</h3><pre>
--- example hook
+-- example hook that rewrites the URI to a filesystem path.
+
+require 'apache2'
+
+function translate_name(r)
+ if r.uri == "/translate-name" then
+ r.filename = r.document_root .. "/find_me.txt"
+ return apache2.OK
+ end
+ -- we don't care about this URL, give another module a chance
+ return apache2.DECLINED
+end
+</pre></div>
+
+<div class="example"><h3>translate_name2.lua</h3><pre>
+--[[ example hook that rewrites one URI to another URI. It returns a
+ apache2.DECLINED to give other URL mappers a chance to work on the
+ substitution, including the core translate_name hook which maps based
+ on the DocumentRoot.
+
+ Note: It is currently undefined as to whether this runs before or after
+ mod_alias.
+--]]
require 'apache2'
diff --git a/docs/manual/mod/mod_proxy_connect.html.en b/docs/manual/mod/mod_proxy_connect.html.en
index 117f9ff830..de05dfffb7 100644
--- a/docs/manual/mod/mod_proxy_connect.html.en
+++ b/docs/manual/mod/mod_proxy_connect.html.en
@@ -54,11 +54,26 @@
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#allowconnect">AllowCONNECT</a></li>
</ul>
-<h3>See also</h3>
+<h3>Topics</h3>
+<ul id="topics">
+<li><img alt="" src="../images/down.gif" /> <a href="#notes">Request notes</a></li>
+</ul><h3>See also</h3>
<ul class="seealso">
<li><code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code></li>
</ul></div>
-
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="notes" id="notes">Request notes</a></h2>
+ <p><code class="module"><a href="../mod/mod_proxy_connect.html">mod_proxy_connect</a></code> creates the following request notes for
+ logging using the <code>%{VARNAME}n</code> format in
+ <code class="directive"><a href="../mod/mod_log_config.html#logformat">LogFormat</a></code> or
+ <code class="directive"><a href="../mod/core.html#errorlogformat">ErrorLogFormat</a></code>:
+ </p>
+ <dl>
+ <dt>proxy-source-port</dt>
+ <dd>The local port used for the connection to the backend server.</dd>
+ </dl>
+</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AllowCONNECT" id="AllowCONNECT">AllowCONNECT</a> <a name="allowconnect" id="allowconnect">Directive</a></h2>
<table class="directive">
diff --git a/docs/manual/mod/mod_proxy_connect.xml.ja b/docs/manual/mod/mod_proxy_connect.xml.ja
index 011a8c3686..8a78ed03f5 100644
--- a/docs/manual/mod/mod_proxy_connect.xml.ja
+++ b/docs/manual/mod/mod_proxy_connect.xml.ja
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 669473:1023789 (outdated) -->
+<!-- English Revision: 669473:1154342 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
diff --git a/docs/manual/mod/mod_proxy_http.html.en b/docs/manual/mod/mod_proxy_http.html.en
index ce593e2144..33b94aa1b9 100644
--- a/docs/manual/mod/mod_proxy_http.html.en
+++ b/docs/manual/mod/mod_proxy_http.html.en
@@ -54,6 +54,7 @@
<h3>Topics</h3>
<ul id="topics">
<li><img alt="" src="../images/down.gif" /> <a href="#env">Environment Variables</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#notes">Request notes</a></li>
</ul><h3>See also</h3>
<ul class="seealso">
<li><code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code></li>
@@ -121,6 +122,20 @@
especially with HTTP/1.0 clients.
</dd>
</dl>
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
+<h2><a name="notes" id="notes">Request notes</a></h2>
+ <p><code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code> creates the following request notes for
+ logging using the <code>%{VARNAME}n</code> format in
+ <code class="directive"><a href="../mod/mod_log_config.html#logformat">LogFormat</a></code> or
+ <code class="directive"><a href="../mod/core.html#errorlogformat">ErrorLogFormat</a></code>:
+ </p>
+ <dl>
+ <dt>proxy-source-port</dt>
+ <dd>The local port used for the connection to the backend server.</dd>
+ <dt>proxy-status</dt>
+ <dd>The HTTP status received from the backend server.</dd>
+ </dl>
</div>
</div>
<div class="bottomlang">