new_api_2_4.html.en revision 2509f1cd3be884abbe4852e15b8da00bebaad5b1
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
60a4b2c422dcbb08a554fb193105c08da592718bpoirier XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
60a4b2c422dcbb08a554fb193105c08da592718bpoirier This file is generated from xml source: DO NOT EDIT
60a4b2c422dcbb08a554fb193105c08da592718bpoirier XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<title>API Changes in Apache HTTP Server 2.4 since 2.2 - Apache HTTP Server</title>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<link href="/images/favicon.ico" rel="shortcut icon" /></head>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>API Changes in Apache HTTP Server 2.4 since 2.2</h1>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<p><span>Available Languages: </span><a href="/en/developer/new_api_2_4.html" title="English"> en </a></p>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>This document describes changes to the Apache HTTPD API from
60a4b2c422dcbb08a554fb193105c08da592718bpoirier version 2.2 to 2.4, that may be of interest to module/application
60a4b2c422dcbb08a554fb193105c08da592718bpoirier developers and core hacks. At the time of writing, the 2.4 API
60a4b2c422dcbb08a554fb193105c08da592718bpoirier is not finalised, and this document may serve to highlight
60a4b2c422dcbb08a554fb193105c08da592718bpoirier points that call for further review.</p>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>API changes fall into two categories: APIs that are altogether new,
60a4b2c422dcbb08a554fb193105c08da592718bpoirier and existing APIs that are expanded or changed. The latter are
60a4b2c422dcbb08a554fb193105c08da592718bpoirier further divided into those where all changes are back-compatible
60a4b2c422dcbb08a554fb193105c08da592718bpoirier (so existing modules can ignore them), and those that might
60a4b2c422dcbb08a554fb193105c08da592718bpoirier require attention by maintainers. As with the transition from
60a4b2c422dcbb08a554fb193105c08da592718bpoirier HTTPD 2.0 to 2.2, existing modules and applications will require
60a4b2c422dcbb08a554fb193105c08da592718bpoirier recompiling and may call for some attention, but most should not
60a4b2c422dcbb08a554fb193105c08da592718bpoirier require any substantial updating (although some may be able to
60a4b2c422dcbb08a554fb193105c08da592718bpoirier take advantage of API changes to offer significant improvements).</p>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>For the purpose of this document, the API is split according
60a4b2c422dcbb08a554fb193105c08da592718bpoirier to the public header files. These headers are themselves the
60a4b2c422dcbb08a554fb193105c08da592718bpoirier reference documentation, and can be used to generate a browsable
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#api_changes">Changed APIs</a></li>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf<li><img alt="" src="/images/down.gif" /> <a href="#upgrading">Specific information on upgrading modules from 2.2</a></li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf<h2><a name="api_changes" id="api_changes">Changed APIs</a></h2>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="ap_expr" id="ap_expr">ap_expr (NEW!)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>Introduces a new API to parse and evaluate boolean and algebraic
60a4b2c422dcbb08a554fb193105c08da592718bpoirier expressions, including provision for a standard syntax and
60a4b2c422dcbb08a554fb193105c08da592718bpoirier customised variants.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="ap_listen" id="ap_listen">ap_listen (changed; back-compatible)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>Introduces new API to enable apache child processes to serve different purposes.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="ap_mpm" id="ap_mpm">ap_mpm (changed)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p><code>ap_mpm_run</code> is replaced by a new <code>mpm</code> hook.
60a4b2c422dcbb08a554fb193105c08da592718bpoirier Also <code>ap_graceful_stop_signalled</code> is lost, and
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <code>ap_mpm_register_timed_callback</code> is new.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="ap_regex" id="ap_regex">ap_regex (changed)</a></h3>
a04dcd330b05345681a4057702b2d43b2042e21dtrawick <p>In addition to the existing regexp wrapper, a new higher-level API
a04dcd330b05345681a4057702b2d43b2042e21dtrawick <code>ap_rxplus</code> is now provided. This provides the capability to
a04dcd330b05345681a4057702b2d43b2042e21dtrawick compile Perl-style expressions like <code>s/regexp/replacement/flags</code>
f8b7daeb0e3f0ac4544fcc665de10c6b69a1ce0dsf and to execute them against arbitrary strings. Support for regexp
f8b7daeb0e3f0ac4544fcc665de10c6b69a1ce0dsf backreference.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="ap_slotmem" id="ap_slotmem">ap_slotmem (NEW!)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>Introduces an API for modules to allocate and manage memory slots
60a4b2c422dcbb08a554fb193105c08da592718bpoirier (normally) for shared memory.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="ap_socache" id="ap_socache">ap_socache (NEW!)</a></h3>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="heartbeat" id="heartbeat">heartbeat (NEW!)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>common structures for heartbeat modules (should this be public API?)</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="http_config" id="http_config">http_config (changed)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>Introduces per-module, per-directory loglevels, including macro wrappers.</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New AP_DECLARE_MODULE macro to declare all modules.</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New APLOG_USE_MODULE macro necessary for per-module loglevels in
60a4b2c422dcbb08a554fb193105c08da592718bpoirier multi-file modules.</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New API to retain data across module unload/load</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New ap_process_fnmatch_configs() to process wildcards</li>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="http_core" id="http_core">http_core (changed)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>REMOVED ap_default_type, ap_requires, all 2.2 authnz API</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>Introduces Optional Functions for logio and authnz</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New function ap_get_server_name_for_url to support ipv6 literals.</li>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <li>New function ap_register_errorlog_handler to register errorlog
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf format string handlers.</li>
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen <li>New function ap_state_query to determine if the server is in the
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen initial configuration preflight phase or not. This is both easier to
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen use and more correct than the old method of creating a pool userdata
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen entry in the process pool.</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>Introduce per-directory, per-module loglevel</li>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <li>Introduce errorlog ids for requests and connections</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>Support buffering filter data for async requests</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>Function changes: ap_escape_html updated; ap_unescape_all, ap_escape_path_segment_buffer</li>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="http_log" id="http_log">http_log (changed)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>Introduce per-directory, per-module loglevel</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>ap_log_*error become macro wrappers (fully back-compatible if
60a4b2c422dcbb08a554fb193105c08da592718bpoirier APLOG_MARK macro is used)</li>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="http_request" id="http_request">http_request (changed)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New auth_internal API and auth_provider API</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New flags AP_AUTH_INTERNAL_PER_CONF and AP_AUTH_INTERNAL_PER_URI</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New access_checker_ex hook to apply additional access control and/or
60a4b2c422dcbb08a554fb193105c08da592718bpoirier bypass authentication.</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>New functions ap_hook_check_access_ex, ap_hook_check_access,
60a4b2c422dcbb08a554fb193105c08da592718bpoirier ap_hook_check_authn, ap_hook_check_authz which accept
60a4b2c422dcbb08a554fb193105c08da592718bpoirier AP_AUTH_INTERNAL_PER_* flags</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>DEPRECATED direct use of ap_hook_access_checker, access_checker_ex,
60a4b2c422dcbb08a554fb193105c08da592718bpoirier ap_hook_check_user_id, ap_hook_auth_checker</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>When possible, registering all access control hooks (including
60a4b2c422dcbb08a554fb193105c08da592718bpoirier authentication and authorization hooks) using AP_AUTH_INTERNAL_PER_CONF
60a4b2c422dcbb08a554fb193105c08da592718bpoirier is recommended. If all modules' access control hooks are registered
60a4b2c422dcbb08a554fb193105c08da592718bpoirier with this flag, then whenever the server handles an internal
60a4b2c422dcbb08a554fb193105c08da592718bpoirier sub-request that matches the same set of access control configuration
60a4b2c422dcbb08a554fb193105c08da592718bpoirier directives as the initial request (which is the common case), it can
60a4b2c422dcbb08a554fb193105c08da592718bpoirier avoid invoking the access control hooks another time.</p>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>If your module requires the old behavior and must perform access
60a4b2c422dcbb08a554fb193105c08da592718bpoirier control checks on every sub-request with a different URI from the
60a4b2c422dcbb08a554fb193105c08da592718bpoirier initial request, even if that URI matches the same set of access
60a4b2c422dcbb08a554fb193105c08da592718bpoirier control configuration directives, then use AP_AUTH_INTERNAL_PER_URI.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="mod_auth" id="mod_auth">mod_auth (NEW!)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>Introduces the new provider framework for authn and authz</p>
b6529ec5115d80b7dedcfd0935746015b2096084minfrin <h3><a name="mod_cache" id="mod_cache">mod_cache (changed)</a></h3>
b6529ec5115d80b7dedcfd0935746015b2096084minfrin <p>Introduces a commit_entity() function to the cache provider interface,
b6529ec5115d80b7dedcfd0935746015b2096084minfrin allowing atomic writes to cache. Add a cache_status() hook to report
b6529ec5115d80b7dedcfd0935746015b2096084minfrin the cache decision. Remove all private structures and functions from the
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="mod_core" id="mod_core">mod_core (NEW!)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>This introduces low-level APIs to send arbitrary headers,
60a4b2c422dcbb08a554fb193105c08da592718bpoirier and exposes functions to handle HTTP OPTIONS and TRACE.</p>
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin <h3><a name="mod_cache_disk" id="mod_cache_disk">mod_cache_disk (changed)</a></h3>
b6529ec5115d80b7dedcfd0935746015b2096084minfrin <p>Changes the disk format of the disk cache to support atomic cache
b6529ec5115d80b7dedcfd0935746015b2096084minfrin updates without locking. The device/inode pair of the body file is
b6529ec5115d80b7dedcfd0935746015b2096084minfrin embedded in the header file, allowing confirmation that the header
b6529ec5115d80b7dedcfd0935746015b2096084minfrin and body belong to one another.</p>
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin <h3><a name="mod_disk_cache" id="mod_disk_cache">mod_disk_cache (renamed)</a></h3>
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin <p>The mod_disk_cache module has been renamed to mod_cache_disk in
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin order to be consistent with the naming of other modules within the
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin server.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="mod_request" id="mod_request">mod_request (NEW!)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>The API for <code class="module"><a href="/mod/mod_request.html">mod_request</a></code>, to make input data
60a4b2c422dcbb08a554fb193105c08da592718bpoirier available to multiple application/handler modules where required,
60a4b2c422dcbb08a554fb193105c08da592718bpoirier and to parse HTML form data.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="mpm_common" id="mpm_common">mpm_common (changed)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>REMOVES: accept, lockfile, lock_mech, set_scoreboard (locking uses the new ap_mutex API)</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>NEW API to drop privileges (delegates this platform-dependent
60a4b2c422dcbb08a554fb193105c08da592718bpoirier function to modules)</li>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <li>NEW Hooks: mpm_query, mpm_note_child_killed, timed_callback, get_name, and function ap_mpm_note_child_killed</li>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="scoreboard" id="scoreboard">scoreboard (changed)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>ap_get_scoreboard_worker is gratuitously made non-back-compatible
60a4b2c422dcbb08a554fb193105c08da592718bpoirier as an alternative version is introduced. Additional proxy_balancer
60a4b2c422dcbb08a554fb193105c08da592718bpoirier support. Child status stuff revamped.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="util_cookies" id="util_cookies">util_cookies (NEW!)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>Introduces a new API for managing HTTP Cookies.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="util_ldap" id="util_ldap">util_ldap (changed)</a></h3>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="util_mutex" id="util_mutex">util_mutex (NEW!)</a></h3>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>A wrapper for APR proc and global mutexes in httpd.</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="util_script" id="util_script">util_script (changed)</a></h3>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="util_time" id="util_time">util_time (changed)</a></h3>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf<h2><a name="upgrading" id="upgrading">Specific information on upgrading modules from 2.2</a></h2>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <h3><a name="upgrading_logging" id="upgrading_logging">Logging</a></h3>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <p>In order to take advantage of per-module loglevel configuration, any
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf source file that calls the <code>ap_log_*</code> functions should declare
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf which module it belongs to. If the module's module_struct is called
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <code>foo_module</code>, the following code can be used to remain
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf backward compatible with HTTPD 2.0 and 2.2:</p>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf #ifdef APLOG_USE_MODULE<br />
50c04f297d76a57ead2fa6b73845f7563b1fc788sf APLOG_USE_MODULE(foo);<br />
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <p>The number of parameters of the <code>ap_log_*</code> functions and the
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf definition of <code>APLOG_MARK</code> has changed. Normally, the change
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf is completely transparent. However, if a module implements wrapper
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf functions for <code>ap_log_*</code> and uses <code>APLOG_MARK</code>
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf when calling these wrappers, some adjustments are necessary.
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf The easiest way is for the module to define and use a different macro
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf that expands to the parameters required by the log wrapper functions.
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf <code>ap_log_*</code> without additional wrappers. In this way, the
5cd08ee4a8f5a665e656f70048a1268a02bc0e73sf code will remain compatible with HTTPD 2.0 and 2.2.</p>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <p>Consider the following changes to take advantage of the new
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <li>Check current use of <code>APLOG_DEBUG</code> and
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick consider if one of the <code>APLOG_TRACEn</code> levels is
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick more appropriate.</li>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <li>If your module currently has a mechanism for configuring
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick the amount of debug logging which is performed, consider
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick eliminating that mechanism and relying on the use of
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick different <code>APLOG_TRACEn</code> levels. If expensive
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick trace processing needs to be bypassed depending on the
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick configured log level, use the <code>APLOGtrace<em>n</em></code>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick and <code>APLOGrtrace<em>n</em></code> macros to first check
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick if tracing is enabled.</li>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <p>Modules sometimes add process id and/or thread id to their log
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick messages. These ids are now logged by default, so it may not
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick be necessary for the module to log them explicitly. (Users may
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick remove them from the error log format, but they can be
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick instructed to add it back if necessary for problem diagnosis.)</p>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <h3><a name="upgrading_byfunction" id="upgrading_byfunction">If your module uses these existing APIs...</a></h3>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>This is no longer available; Content-Type must be configured
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick explicitly or added by the application.</dd>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>If the returned server name is used in a URL,
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick use <code>ap_get_server_name_for_url()</code> instead. This new
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick function handles the odd case where the server name is an IPv6
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick literal address.</dd>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>For logging purposes, where detailed information is
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick appropriate, use <code>ap_get_server_description()</code>.
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick When generating output, where the amount of information
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick should be configurable by ServerTokens, use
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>Replace with a call
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick to <code>ap_mpm_query(AP_MPMQ_MPM_STATE)</code> and checking for
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dt><code>ap_max_daemons_limit</code>, <code>ap_my_generation</code>,
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <code>AP_MPMQ_MAX_DAEMON_USED</code>, <code>AP_MPMQ_GENERATION</code>,
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick and <code>AP_MPMQ_MAX_THREADS</code>, respectively.</dd>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>Ensure that it is not used until after the register-hooks
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick hook has completed. Otherwise, an MPM built as a DSO
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick would not have had a chance to enable support for this
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick function.</dd>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dt><code>ap_server_conf->process->pool</code>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick userdata</dt>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <li>If your module uses this to determine which pass of the
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick startup hooks is being run,
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick use <code>ap_state_query(AP_SQ_MAIN_STATE)</code>.</li>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <li>If your module uses this to maintain data across the
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick unloading and reloading of your module, use
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <code>ap_proc_mutex_create()</code>; these allow your
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick mutexes to be configurable with
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick the <code class="directive"><a href="/mod/core.html#mutex">Mutex</a></code> directive;
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick you can also remove any configuration mechanisms in your
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick module for such mutexes
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>Previously, these assumed that <code>errno</code> contained
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick information describing the failure. Now,
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick an <code>apr_status_t</code> parameter must be provided. Pass
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick 0/APR_SUCCESS if there is no such error information, or a valid
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <h3><a name="upgrading_byfeature" id="upgrading_byfeature">If your module interfaces with this feature...</a></h3>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>Optional: If your module logs an error
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick when <code>ap_unixd_config.suexec_enabled</code> is 0,
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick also log the value of the new
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick field <code>suexec_disabled_reason</code>, which contains an
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick explanation of why it is not available.</dd>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>In previous releases, <code>ExtendedStatus</code> had to be
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick mod_status was loaded. In 2.4, just
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick set <code>ap_extended_status</code> to <code>1</code> in a
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick pre-config hook and the extended status data will be
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick available.</dd>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <h3><a name="upgrading_newfeatures" id="upgrading_newfeatures">Does your module...</a></h3>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>Consider if <code>ap_args_to_table()</code> would be
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick helpful.</dd>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dt>Check for request header fields <code>Content-Length</code>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick and <code>Transfer-Encoding</code> to see if a body was
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick specified</dt>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dt>Implement cleanups which clear pointer variables</dt>
2d5f033e0b60accdc5c92470a71c6e9cd6c90803trawick <dd>Use <code>ap_pool_cleanup_set_null()</code>.</dd>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<p><span>Available Languages: </span><a href="/en/developer/new_api_2_4.html" title="English"> en </a></p>
9c1260efa52c82c2a58e5b5f20cd6902563d95f5rbowen<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>