From cb617157d2fef5cac279295880f6ffb408499009 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Tue, 21 Feb 2012 13:26:06 +0000 Subject: [PATCH] apply insufficient TLC, making some improvements to wording and typography git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1291766 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/developer/new_api_2_4.xml | 166 ++++++++++++++------------ 1 file changed, 92 insertions(+), 74 deletions(-) diff --git a/docs/manual/developer/new_api_2_4.xml b/docs/manual/developer/new_api_2_4.xml index 92fe8b7fa9..ec231eda20 100644 --- a/docs/manual/developer/new_api_2_4.xml +++ b/docs/manual/developer/new_api_2_4.xml @@ -27,12 +27,16 @@

This document describes changes to the Apache HTTPD API from version 2.2 to 2.4, that may be of interest to module/application - developers and core hacks. At the time of writing, the 2.4 API - is not finalised, and this document may serve to highlight - points that call for further review.

+ developers and core hacks. As of the first GA release of the + 2.4 branch API compatibility is preserved for the life of the + 2.4 branch. (The + VERSIONING + description for the 2.4 release provides more information about API + compatibility.)

+

API changes fall into two categories: APIs that are altogether new, and existing APIs that are expanded or changed. The latter are - further divided into those where all changes are back-compatible + further divided into those where all changes are backwards-compatible (so existing modules can ignore them), and those that might require attention by maintainers. As with the transition from HTTPD 2.0 to 2.2, existing modules and applications will require @@ -56,8 +60,9 @@

- ap_listen (changed; back-compatible) -

Introduces new API to enable apache child processes to serve different purposes.

+ ap_listen (changed; backwards-compatible) +

Introduces a new API to enable httpd child processes to serve + different purposes.

@@ -73,13 +78,13 @@ ap_rxplus is now provided. This provides the capability to compile Perl-style expressions like s/regexp/replacement/flags and to execute them against arbitrary strings. Support for regexp - backreference.

+ backreferences is also added.

ap_slotmem (NEW!) -

Introduces an API for modules to allocate and manage memory slots - (normally) for shared memory.

+

Introduces an API for modules to allocate and manage memory slots, + most commonly for shared memory.

@@ -89,7 +94,7 @@
heartbeat (NEW!) -

common structures for heartbeat modules (should this be public API?)

+

common structures for heartbeat modules

@@ -103,14 +108,15 @@ http_config (changed)
  • Introduces per-module, per-directory loglevels, including macro wrappers.
  • -
  • New AP_DECLARE_MODULE macro to declare all modules.
  • -
  • New APLOG_USE_MODULE macro necessary for per-module loglevels in +
  • New AP_DECLARE_MODULE macro to declare all modules.
  • +
  • New APLOG_USE_MODULE macro necessary for per-module loglevels in multi-file modules.
  • New API to retain data across module unload/load
  • -
  • New check_config hook
  • -
  • New ap_process_fnmatch_configs() to process wildcards
  • -
  • Change ap_configfile_t, ap_cfg_getline(), ap_cfg_getc() to return error - code, new ap_pcfg_strerror().
  • +
  • New check_config hook
  • +
  • New ap_process_fnmatch_configs() function to process wildcards
  • +
  • Change ap_configfile_t, ap_cfg_getline(), + ap_cfg_getc() to return error codes, and add + ap_pcfg_strerror() for retrieving an error description.
  • Any config directive permitted in ACCESS_CONF context must now correctly handle being called from an .htaccess file via the new AllowOverrideList directive. @@ -122,18 +128,20 @@
    http_core (changed)
      -
    • REMOVED ap_default_type, ap_requires, all 2.2 authnz API
    • +
    • REMOVED ap_default_type, ap_requires, all + 2.2 authnz API
    • Introduces Optional Functions for logio and authnz
    • -
    • New function ap_get_server_name_for_url to support ipv6 literals.
    • -
    • New function ap_register_errorlog_handler to register errorlog +
    • New function ap_get_server_name_for_url to support IPv6 + literals.
    • +
    • New function ap_register_errorlog_handler to register error log format string handlers.
    • -
    • Arguments of error_log hook have changed. Declaration has moved to +
    • Arguments of error_log hook have changed. Declaration has moved to http_core.h.
    • -
    • New function ap_state_query to determine if the server is in the +
    • New function ap_state_query to determine if the server is in the initial configuration preflight phase or not. This is both easier to use and more correct than the old method of creating a pool userdata entry in the process pool.
    • -
    • New function ap_get_conn_socket to get the socket descriptor for a +
    • New function ap_get_conn_socket to get the socket descriptor for a connection. This should be used instead of accessing the core connection config directly.
    @@ -143,19 +151,20 @@ httpd (changed)
    • Introduce per-directory, per-module loglevel
    • -
    • New loglevels APLOG_TRACEn
    • +
    • New loglevels APLOG_TRACEn
    • Introduce errorlog ids for requests and connections
    • Support for mod_request kept_body
    • Support buffering filter data for async requests
    • -
    • New CONN_STATE values
    • -
    • Function changes: ap_escape_html updated; ap_unescape_all, - ap_escape_path_segment_buffer
    • -
    • Modules that load other modules later than the EXEC_ON_READ config - reading stage need to call ap_reserve_module_slots() or - ap_reserve_module_slots_directive() in their pre_config hook.
    • -
    • The useragent IP address per request can now be specified - independently of the client IP address of the connection for - the benefit of load balancers
    • +
    • New CONN_STATE values
    • +
    • Function changes: ap_escape_html updated; + ap_unescape_all, ap_escape_path_segment_buffer
    • +
    • Modules that load other modules later than the EXEC_ON_READ config + reading stage need to call ap_reserve_module_slots() or + ap_reserve_module_slots_directive() in their + pre_config hook.
    • +
    • The useragent IP address per request can now be tracked + independently of the client IP address of the connection, for + support of deployments with load balancers.
    @@ -163,13 +172,13 @@ http_log (changed)
    • Introduce per-directory, per-module loglevel
    • -
    • New loglevels APLOG_TRACEn
    • -
    • ap_log_*error become macro wrappers (back-compatible if - APLOG_MARK macro is used, except that is no longer possible to - use #ifdef inside the argument list)
    • +
    • New loglevels APLOG_TRACEn
    • +
    • ap_log_*error become macro wrappers (backwards-compatible if + APLOG_MARK macro is used, except that is no longer possible to + use #ifdef inside the argument list)
    • piped logging revamped
    • -
    • module_index added to error_log hook
    • -
    • new function: ap_log_command_line
    • +
    • module_index added to error_log hook
    • +
    • new function: ap_log_command_line
@@ -177,19 +186,22 @@ http_request (changed)
  • New auth_internal API and auth_provider API
  • -
  • New EOR bucket type
  • -
  • New function ap_process_async_request
  • -
  • New flags AP_AUTH_INTERNAL_PER_CONF and AP_AUTH_INTERNAL_PER_URI
  • -
  • New access_checker_ex hook to apply additional access control and/or - bypass authentication.
  • -
  • New functions ap_hook_check_access_ex, ap_hook_check_access, - ap_hook_check_authn, ap_hook_check_authz which accept - AP_AUTH_INTERNAL_PER_* flags
  • -
  • DEPRECATED direct use of ap_hook_access_checker, access_checker_ex, - ap_hook_check_user_id, ap_hook_auth_checker
  • +
  • New EOR bucket type
  • +
  • New function ap_process_async_request
  • +
  • New flags AP_AUTH_INTERNAL_PER_CONF and + AP_AUTH_INTERNAL_PER_URI
  • +
  • New access_checker_ex hook to apply additional access control + and/or bypass authentication.
  • +
  • New functions ap_hook_check_access_ex, + ap_hook_check_access, ap_hook_check_authn, + ap_hook_check_authz which accept + AP_AUTH_INTERNAL_PER_* flags
  • +
  • DEPRECATED direct use of ap_hook_access_checker, + access_checker_ex, ap_hook_check_user_id, + ap_hook_auth_checker

When possible, registering all access control hooks (including - authentication and authorization hooks) using AP_AUTH_INTERNAL_PER_CONF + authentication and authorization hooks) using AP_AUTH_INTERNAL_PER_CONF is recommended. If all modules' access control hooks are registered with this flag, then whenever the server handles an internal sub-request that matches the same set of access control configuration @@ -198,7 +210,8 @@

If your module requires the old behavior and must perform access control checks on every sub-request with a different URI from the initial request, even if that URI matches the same set of access - control configuration directives, then use AP_AUTH_INTERNAL_PER_URI.

+ control configuration directives, then use + AP_AUTH_INTERNAL_PER_URI.

@@ -208,10 +221,10 @@
mod_cache (changed) -

Introduces a commit_entity() function to the cache provider interface, - allowing atomic writes to cache. Add a cache_status() hook to report - the cache decision. Remove all private structures and functions from the - public mod_cache.h header file.

+

Introduces a commit_entity() function to the cache provider + interface, allowing atomic writes to cache. Add a cache_status() + hook to report the cache decision. All private structures and functions were + removed.

@@ -245,18 +258,21 @@
mpm_common (changed)
    -
  • REMOVES: accept, lockfile, lock_mech, set_scoreboard (locking uses the new ap_mutex API)
  • +
  • REMOVES: accept, lockfile, lock_mech, + set_scoreboard (locking uses the new ap_mutex API)
  • NEW API to drop privileges (delegates this platform-dependent function to modules)
  • -
  • NEW Hooks: mpm_query, timed_callback, and get_name
  • -
  • CHANGED interfaces: monitor hook, - ap_reclaim_child_processes, ap_relieve_child_processes
  • +
  • NEW Hooks: mpm_query, timed_callback, and + get_name
  • +
  • CHANGED interfaces: monitor hook, + ap_reclaim_child_processes, + ap_relieve_child_processes
scoreboard (changed) -

ap_get_scoreboard_worker is gratuitously made non-back-compatible +

ap_get_scoreboard_worker is made non-backwards-compatible as an alternative version is introduced. Additional proxy_balancer support. Child status stuff revamped.

@@ -268,22 +284,24 @@
util_ldap (changed) -

I have yet to get a handle on this update.

+

no description available

util_mutex (NEW!) -

A wrapper for APR proc and global mutexes in httpd.

+

A wrapper for APR proc and global mutexes in httpd, providing + common configuration for the underlying mechanism and location + of lock files.

util_script (changed) -

NEW: ap_args_to_table

+

NEW: ap_args_to_table

util_time (changed) -

NEW: ap_recent_ctime_ex

+

NEW: ap_recent_ctime_ex

@@ -464,23 +482,24 @@
unixd_config
This has been renamed to ap_unixd_config.
-
conn_rec->remote_ip and conn_rec->remote_addr
-
In order to distinguish between the client IP address of the - connection, and the useragent IP address of the request potentially - overridden by a load balancer or proxy, the above variables have - been renamed. If a module makes reference to either of the above - variables, they need to be replaced with one of the following two - options as appropriate for the module: +
conn_rec->remote_ip and + conn_rec->remote_addr
+
These fields have been renamed in order to distinguish between + the client IP address of the connection and the useragent IP address + of the request (potentially overridden by a load balancer or proxy). + References to either of these fields must be updated with one of the + following options, as appropriate for the module:
  • When you require the IP address of the user agent, which might be connected directly to the server, or might optionally be separated from the server by a transparent load balancer or - proxy, use request_rec->useragent_ip and - request_rec->useragent_addr.
  • + proxy, use request_rec->useragent_ip and + request_rec->useragent_addr.
  • When you require the IP address of the client that is connected directly to the server, which might be the useragent or might be the load balancer or proxy itself, use - conn_rec->client_ip and conn_rec->client_addr.
  • + conn_rec->client_ip and + conn_rec->client_addr.
@@ -503,7 +522,6 @@ set ap_extended_status to 1 in a pre-config hook and the extended status data will be available. -
-- 2.40.0