modules.xml revision 031b91a62d25106ae69d4693475c79618dd5e884
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<?xml version="1.0" encoding="UTF-8" ?>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<!-- $LastChangedRevision$ -->
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<!--
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China Licensed to the Apache Software Foundation (ASF) under one or more
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China contributor license agreements. See the NOTICE file distributed with
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China this work for additional information regarding copyright ownership.
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China The ASF licenses this file to You under the Apache License, Version 2.0
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China (the "License"); you may not use this file except in compliance with
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China the License. You may obtain a copy of the License at
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China http://www.apache.org/licenses/LICENSE-2.0
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China Unless required by applicable law or agreed to in writing, software
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China distributed under the License is distributed on an "AS IS" BASIS,
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China See the License for the specific language governing permissions and
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China limitations under the License.
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China-->
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<manualpage metafile="modules.xml.meta">
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<parentdocument href="./">Developer Documentation</parentdocument>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer<title>Converting Modules from Apache 1.3 to Apache 2.0</title>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<summary>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>This is a first attempt at writing the lessons I learned
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China when trying to convert the <code>mod_mmap_static</code> module to Apache
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China 2.0. It's by no means definitive and probably won't even be
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China correct in some ways, but it's a start.</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China</summary>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<section id="easy"><title>The easier changes ...</title>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <section id="cleanup"><title>Cleanup Routines</title>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>These now need to be of type <code>apr_status_t</code> and return a
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China value of that type. Normally the return value will be
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <code>APR_SUCCESS</code> unless there is some need to signal an error in
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China the cleanup. Be aware that even though you signal an error not all code
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China yet checks and acts upon the error.</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </section>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <section id="init"><title>Initialisation Routines</title>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>These should now be renamed to better signify where they sit
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China in the overall process. So the name gets a small change from
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <code>mmap_init</code> to <code>mmap_post_config</code>. The arguments
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China passed have undergone a radical change and now look like</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <ul>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>apr_pool_t *p</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>apr_pool_t *plog</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>apr_pool_t *ptemp</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>server_rec *s</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </ul>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </section>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <section id="datatypes"><title>Data Types</title>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>A lot of the data types have been moved into the <a
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China href="http://apr.apache.org/">APR</a>. This means that some have had
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China a name change, such as the one shown above. The following is a brief
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China list of some of the changes that you are likely to have to make.</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <ul>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>pool</code> becomes <code>apr_pool_t</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>table</code> becomes <code>apr_table_t</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </ul>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </section>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China</section>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China<section id="messy"><title>The messier changes...</title>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <section id="register-hooks"><title>Register Hooks</title>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>The new architecture uses a series of hooks to provide for
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China calling your functions. These you'll need to add to your module
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China by way of a new function, <code>static void register_hooks(void)</code>.
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China The function is really reasonably straightforward once you
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China understand what needs to be done. Each function that needs
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China calling at some stage in the processing of a request needs to
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China be registered, handlers do not. There are a number of phases
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China where functions can be added, and for each you can specify with
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China a high degree of control the relative order that the function
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China will be called in.</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>This is the code that was added to <code>mod_mmap_static</code>:</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <example><pre>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing Chinastatic void register_hooks(void)
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China{
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China static const char * const aszPre[]={ "http_core.c",NULL };
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE);
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China ap_hook_translate_name(mmap_static_xlat,aszPre,NULL,HOOK_LAST);
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China};</pre>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </example>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>This registers 2 functions that need to be called, one in
dda0720a40a5b9892e9c96b39ff67c6f504656afjing xiong ERI-SUN the <code>post_config</code> stage (virtually every module will need this
dda0720a40a5b9892e9c96b39ff67c6f504656afjing xiong ERI-SUN one) and one for the <code>translate_name</code> phase. note that while
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China there are different function names the format of each is
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China identical. So what is the format?</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <example>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China ap_hook_<var>phase_name</var>(<var>function_name</var>,
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <var>predecessors</var>, <var>successors</var>, <var>position</var>);
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </example>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>There are 3 hook positions defined...</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <ul>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>HOOK_FIRST</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>HOOK_MIDDLE</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <li><code>HOOK_LAST</code></li>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </ul>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>To define the position you use the position and then modify
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China it with the predecessors and successors. Each of the modifiers
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China can be a list of functions that should be called, either before
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China the function is run (predecessors) or after the function has
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China run (successors).</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>In the <code>mod_mmap_static</code> case I didn't care about the
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <code>post_config</code> stage, but the <code>mmap_static_xlat</code>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <strong>must</strong> be called after the core module had done it's name
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China translation, hence the use of the aszPre to define a modifier to the
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China position <code>HOOK_LAST</code>.</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </section>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <section id="moddef"><title>Module Definition</title>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>There are now a lot fewer stages to worry about when
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China creating your module definition. The old defintion looked
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China like</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <example><pre>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing Chinamodule MODULE_VAR_EXPORT <var>module_name</var>_module =
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China{
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China STANDARD_MODULE_STUFF,
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* initializer */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* dir config creater */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* dir merger --- default is to override */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* server config */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* merge server config */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* command handlers */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* handlers */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* filename translation */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* check_user_id */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* check auth */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* check access */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* type_checker */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* fixups */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* logger */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* header parser */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* child_init */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* child_exit */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* post read-request */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China};</pre>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </example>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>The new structure is a great deal simpler...</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <example><pre>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing Chinamodule MODULE_VAR_EXPORT <var>module_name</var>_module =
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China{
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China STANDARD20_MODULE_STUFF,
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* create per-directory config structures */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* merge per-directory config structures */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* create per-server config structures */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* merge per-server config structures */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* command handlers */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* handlers */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China /* register hooks */
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China};</pre>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </example>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>Some of these read directly across, some don't. I'll try to
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China summarise what should be done below.</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>The stages that read directly across :</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dl>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>/* dir config creater */</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd><code>/* create per-directory config structures */</code></dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>/* server config */</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd><code>/* create per-server config structures */</code></dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>/* dir merger */</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd><code>/* merge per-directory config structures */</code></dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>/* merge server config */</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd><code>/* merge per-server config structures */</code></dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>/* command table */</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd><code>/* command apr_table_t */</code></dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>/* handlers */</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd><code>/* handlers */</code></dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </dl>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <p>The remainder of the old functions should be registered as
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China hooks. There are the following hook stages defined so
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China far...</p>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dl>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_post_config</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>this is where the old <code>_init</code> routines get
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China registered</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_http_method</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>retrieve the http method from a request. (legacy)</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_open_logs</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>open any specified logs</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_auth_checker</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>check if the resource requires authorization</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_access_checker</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>check for module-specific restrictions</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_check_user_id</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>check the user-id and password</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_default_port</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>retrieve the default port for the server</dd>
dda0720a40a5b9892e9c96b39ff67c6f504656afjing xiong ERI-SUN
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_pre_connection</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>do any setup required just before processing, but after
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China accepting</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_process_connection</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>run the correct protocol</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_child_init</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>call as soon as the child is started</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_create_request</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>??</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_fixups</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>last chance to modify things before generating content</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_handler</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>generate the content</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_header_parser</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>lets modules look at the headers, not used by most modules, because
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China they use <code>post_read_request</code> for this</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_insert_filter</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>to insert filters into the filter chain</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_log_transaction</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>log information about the request</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_optional_fn_retrieve</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>retrieve any functions registered as optional</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_post_read_request</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>called after reading the request, before any other phase</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_quick_handler</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>called before any request processing, used by cache modules.</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_translate_name</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>translate the URI into a filename</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dt><code>ap_hook_type_checker</code></dt>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China <dd>determine and/or set the doc type</dd>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </dl>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China </section>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China</section>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China</manualpage>
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China
9a5557fdd04be37785607871e8d4189e39490129lucy wang - Sun Microsystems - Beijing China