+ * a <Limit> container, or by *not* being listed in a <LimitExcept>
* container.
*
* @param method Pointer to a string specifying the method to check.
@@ -487,16 +640,29 @@ AP_DECLARE(int) ap_method_is_limited(cmd_parms *cmd, const char *method);
* @param arg The argument to the directive
* @return An error string or NULL on success
*/
-AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd,
- void *struct_ptr, const char *arg);
+AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd,
+ void *struct_ptr,
+ const char *arg);
+/**
+ * Generic command handling function for flags stored in an int
+ * @param cmd The command parameters for this directive
+ * @param struct_ptr pointer into a given type
+ * @param arg The argument to the directive (either 1 or 0)
+ * @return An error string or NULL on success
+ */
+AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd,
+ void *struct_ptr,
+ int arg);
/**
- * Generic command handling function for flags
+ * Generic command handling function for flags stored in a char
* @param cmd The command parameters for this directive
* @param struct_ptr pointer into a given type
* @param arg The argument to the directive (either 1 or 0)
* @return An error string or NULL on success
*/
-AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, void *struct_ptr, int arg);
+AP_DECLARE_NONSTD(const char *) ap_set_flag_slot_char(cmd_parms *cmd,
+ void *struct_ptr,
+ int arg);
/**
* Generic command handling function for files
* @param cmd The command parameters for this directive
@@ -504,24 +670,27 @@ AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, void *struct_pt
* @param arg The argument to the directive
* @return An error string or NULL on success
*/
-AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, void *struct_ptr, const char *arg);
+AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd,
+ void *struct_ptr,
+ const char *arg);
/**
* Generic command handling function to respond with cmd->help as an error
* @param cmd The command parameters for this directive
* @param struct_ptr pointer into a given type
* @param arg The argument to the directive
* @return The cmd->help value as the error string
- * @tip This allows simple declarations such as;
- *
- * AP_INIT_RAW_ARGS("Foo", ap_set_deprecated, NULL, OR_ALL,
+ * @note This allows simple declarations such as:
+ * @code
+ * AP_INIT_RAW_ARGS("Foo", ap_set_deprecated, NULL, OR_ALL,
* "The Foo directive is no longer supported, use Bar"),
- *
+ * @endcode
*/
-AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd, void *struct_ptr, const char *arg);
+AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd,
+ void *struct_ptr,
+ const char *arg);
/**
- * For modules which need to read config files, open logs, etc. ...
- * this returns the fname argument if it begins with '/'; otherwise
- * it relativizes it wrt server_root.
+ * For modules which need to read config files, open logs, etc. this returns
+ * the canonical form of fname made absolute to ap_server_root.
* @param p pool to allocate data from
* @param fname The file name
*/
@@ -533,8 +702,10 @@ AP_DECLARE(char *) ap_server_root_relative(apr_pool_t *p, const char *fname);
* Add a module to the server
* @param m The module structure of the module to add
* @param p The pool of the same lifetime as the module
+ * @param s The module's symbol name (used for logging)
*/
-AP_DECLARE(void) ap_add_module(module *m, apr_pool_t *p);
+AP_DECLARE(const char *) ap_add_module(module *m, apr_pool_t *p,
+ const char *s);
/**
* Remove a module from the server. There are some caveats:
@@ -547,29 +718,29 @@ AP_DECLARE(void) ap_add_module(module *m, apr_pool_t *p);
AP_DECLARE(void) ap_remove_module(module *m);
/**
* Add a module to the chained modules list and the list of loaded modules
- * @param m The module structure of the module to add
+ * @param mod The module structure of the module to add
* @param p The pool with the same lifetime as the module
+ * @param s The module's symbol name (used for logging)
*/
-AP_DECLARE(void) ap_add_loaded_module(module *mod, apr_pool_t *p);
+AP_DECLARE(const char *) ap_add_loaded_module(module *mod, apr_pool_t *p,
+ const char *s);
/**
* Remove a module fromthe chained modules list and the list of loaded modules
- * @param m the module structure of the module to remove
+ * @param mod the module structure of the module to remove
*/
AP_DECLARE(void) ap_remove_loaded_module(module *mod);
-/**
- * Add a module to the list of loaded module based on the name of the
- * module
- * @param name The name of the module
- * @param p The pool valid for the lifetime of the module
- * @return 1 on success, 0 on failure
- */
-AP_DECLARE(int) ap_add_named_module(const char *name, apr_pool_t *p);
/**
* Find the name of the specified module
* @param m The module to get the name for
* @return the name of the module
*/
AP_DECLARE(const char *) ap_find_module_name(module *m);
+/**
+ * Find the short name of the module identified by the specified module index
+ * @param module_index The module index to get the name for
+ * @return the name of the module, NULL if not found
+ */
+AP_DECLARE(const char *) ap_find_module_short_name(int module_index);
/**
* Find a module based on the name of the module
* @param name the name of the module
@@ -583,10 +754,11 @@ AP_DECLARE(module *) ap_find_linked_module(const char *name);
* @param p The pool to allocate the structure from
* @param name the name of the file to open
*/
-AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg, apr_pool_t *p, const char *name);
+AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg,
+ apr_pool_t *p, const char *name);
/**
- * Allocate a ap_configfile_t handle with user defined functions and params
+ * Allocate a ap_configfile_t handle with user defined functions and params
* @param p The pool to allocate from
* @param descr The name of the file
* @param param The argument passed to getch/getstr/close
@@ -594,27 +766,30 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg, apr_pool_t
* @param gets_func The getstr function
* @param close_func The close function
*/
-AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *descr,
+AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p,
+ const char *descr,
void *param,
- int(*getc_func)(void*),
- void *(*gets_func) (void *buf, size_t bufsiz, void *param),
- int(*close_func)(void *param));
+ apr_status_t (*getc_func) (char *ch, void *param),
+ apr_status_t (*gets_func) (void *buf, size_t bufsiz, void *param),
+ apr_status_t (*close_func) (void *param));
/**
- * Read one line from open ap_configfile_t, strip LF, increase line number
+ * Read one line from open ap_configfile_t, strip leading and trailing
+ * whitespace, increase line number
* @param buf place to store the line read
* @param bufsize size of the buffer
* @param cfp File to read from
- * @return 1 on success, 0 on failure
+ * @return error status, APR_ENOSPC if bufsize is too small for the line
*/
-AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp);
+AP_DECLARE(apr_status_t) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp);
/**
- * Read one char from open configfile_t, increase line number upon LF
+ * Read one char from open configfile_t, increase line number upon LF
+ * @param ch place to store the char read
* @param cfp The file to read from
- * @return the character read
+ * @return error status
*/
-AP_DECLARE(int) ap_cfg_getc(ap_configfile_t *cfp);
+AP_DECLARE(apr_status_t) ap_cfg_getc(char *ch, ap_configfile_t *cfp);
/**
* Detach from open ap_configfile_t, calling the close handler
@@ -624,8 +799,18 @@ AP_DECLARE(int) ap_cfg_getc(ap_configfile_t *cfp);
AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp);
/**
- * Read all data between the current and the matching . All
- * of this data is forgotten immediately.
+ * Convert a return value from ap_cfg_getline or ap_cfg_getc to a user friendly
+ * string.
+ * @param p The pool to allocate the string from
+ * @param cfp The config file
+ * @return The error string, NULL if rc == APR_SUCCESS
+ */
+AP_DECLARE(const char *) ap_pcfg_strerror(apr_pool_t *p, ap_configfile_t *cfp,
+ apr_status_t rc);
+
+/**
+ * Read all data between the current <foo> and the matching </foo>. All
+ * of this data is forgotten immediately.
* @param cmd The cmd_parms to pass to the directives inside the container
* @param directive The directive name to read until
* @return Error string on failure, NULL on success
@@ -633,7 +818,7 @@ AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp);
AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive);
/**
- * Read all data between the current and the matching and build
+ * Read all data between the current <foo> and the matching </foo> and build
* a config tree from it
* @param p pool to allocate from
* @param temp_pool Temporary pool to allocate from
@@ -643,12 +828,12 @@ AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive);
* @param orig_directive The directive to read until hit.
* @return Error string on failure, NULL on success
*/
-AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
- apr_pool_t *temp_pool,
- cmd_parms *parms,
- ap_directive_t **current,
- ap_directive_t **curr_parent,
- char *orig_directive);
+AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
+ apr_pool_t *temp_pool,
+ cmd_parms *parms,
+ ap_directive_t **current,
+ ap_directive_t **curr_parent,
+ char *orig_directive);
/**
* Build a config tree from a config file
@@ -659,9 +844,9 @@ AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
* @return Error string on erro, NULL otherwise
*/
AP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
- apr_pool_t *conf_pool,
- apr_pool_t *temp_pool,
- ap_directive_t **conftree);
+ apr_pool_t *conf_pool,
+ apr_pool_t *temp_pool,
+ ap_directive_t **conftree);
/**
* Walk a config tree and setup the server's internal structures
@@ -671,50 +856,66 @@ AP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
* @return Error string on error, NULL otherwise
*/
AP_DECLARE(const char *) ap_walk_config(ap_directive_t *conftree,
- cmd_parms *parms,
+ cmd_parms *parms,
ap_conf_vector_t *section_vector);
/**
- * @defgroup ap_check_cmd_context ap_check_cmd_context
+ * @defgroup ap_check_cmd_context Check command context
* @{
+ */
+/**
* Check the context a command is used in.
* @param cmd The command to check
* @param forbidden Where the command is forbidden.
* @return Error string on error, NULL on success
*/
-AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden);
-
-#define NOT_IN_VIRTUALHOST 0x01 /**< Forbidden in */
-#define NOT_IN_LIMIT 0x02 /**< Forbidden in */
-#define NOT_IN_DIRECTORY 0x04 /**< Forbidden in */
-#define NOT_IN_LOCATION 0x08 /**< Forbidden in */
-#define NOT_IN_FILES 0x10 /**< Forbidden in */
-#define NOT_IN_DIR_LOC_FILE (NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES) /**< Forbidden in //*/
+AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd,
+ unsigned forbidden);
+
+#define NOT_IN_VIRTUALHOST 0x01 /**< Forbidden in <VirtualHost> */
+#define NOT_IN_LIMIT 0x02 /**< Forbidden in <Limit> */
+#define NOT_IN_DIRECTORY 0x04 /**< Forbidden in <Directory> */
+#define NOT_IN_LOCATION 0x08 /**< Forbidden in <Location> */
+#define NOT_IN_FILES 0x10 /**< Forbidden in <Files> */
+/** Forbidden in <Directory>/<Location>/<Files>*/
+#define NOT_IN_DIR_LOC_FILE (NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES)
+/** Forbidden in <VirtualHost>/<Limit>/<Directory>/<Location>/<Files> */
#define GLOBAL_ONLY (NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE)
/** @} */
-#ifdef CORE_PRIVATE
+/**
+ * @brief This structure is used to assign symbol names to module pointers
+ */
+typedef struct {
+ const char *name;
+ module *modp;
+} ap_module_symbol_t;
/**
* The topmost module in the list
- * @defvar module *ap_top_module
+ * @var module *ap_top_module
*/
AP_DECLARE_DATA extern module *ap_top_module;
/**
* Array of all statically linked modules
- * @defvar module *ap_prelinked_modules[]
+ * @var module *ap_prelinked_modules[]
*/
AP_DECLARE_DATA extern module *ap_prelinked_modules[];
+/**
+ * Array of all statically linked modulenames (symbols)
+ * @var ap_module_symbol_t ap_prelinked_module_symbols[]
+ */
+AP_DECLARE_DATA extern ap_module_symbol_t ap_prelinked_module_symbols[];
/**
* Array of all preloaded modules
- * @defvar module *ap_preloaded_modules[]
+ * @var module *ap_preloaded_modules[]
*/
AP_DECLARE_DATA extern module *ap_preloaded_modules[];
/**
* Array of all loaded modules
- * @defvar module **ap_loaded_modules
+ * @var module **ap_loaded_modules
*/
AP_DECLARE_DATA extern module **ap_loaded_modules;
@@ -724,7 +925,7 @@ AP_DECLARE_DATA extern module **ap_loaded_modules;
* @param s The server to configure for.
* @param m The module to configure
*/
-AP_DECLARE(void) ap_single_module_configure(apr_pool_t *p, server_rec *s,
+AP_DECLARE(void) ap_single_module_configure(apr_pool_t *p, server_rec *s,
module *m);
/* For http_main.c... */
@@ -732,7 +933,7 @@ AP_DECLARE(void) ap_single_module_configure(apr_pool_t *p, server_rec *s,
* Add all of the prelinked modules into the loaded module list
* @param process The process that is currently running the server
*/
-AP_DECLARE(void) ap_setup_prelinked_modules(process_rec *process);
+AP_DECLARE(const char *) ap_setup_prelinked_modules(process_rec *process);
/**
* Show the preloaded configuration directives, the help string explaining
@@ -741,12 +942,12 @@ AP_DECLARE(void) ap_setup_prelinked_modules(process_rec *process);
*/
AP_DECLARE(void) ap_show_directives(void);
-/**
- * Show the preloaded module names. Used for httpd -l.
+/**
+ * Show the preloaded module names. Used for httpd -l.
*/
AP_DECLARE(void) ap_show_modules(void);
-/**
+/**
* Show the MPM name. Used in reporting modules such as mod_info to
* provide extra information to the user
*/
@@ -760,7 +961,10 @@ AP_DECLARE(const char *) ap_show_mpm(void);
* @param conftree Place to store the root of the config tree
* @return The setup server_rec list.
*/
-AP_DECLARE(server_rec *) ap_read_config(process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree);
+AP_DECLARE(server_rec *) ap_read_config(process_rec *process,
+ apr_pool_t *temp_pool,
+ const char *config_name,
+ ap_directive_t **conftree);
/**
* Run all rewrite args hooks for loaded modules
@@ -780,7 +984,25 @@ AP_DECLARE(void) ap_register_hooks(module *m, apr_pool_t *p);
* @param p The pool to allocate from
* @param main_server The head of the server_rec list
*/
-AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server);
+AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p,
+ server_rec *main_server);
+
+/**
+ * Reserve some modules slots for modules loaded by other means than
+ * EXEC_ON_READ directives.
+ * Relevant modules should call this in the pre_config stage.
+ * @param count The number of slots to reserve.
+ */
+AP_DECLARE(void) ap_reserve_module_slots(int count);
+
+/**
+ * Reserve some modules slots for modules loaded by a specific
+ * non-EXEC_ON_READ config directive.
+ * This counts how often the given directive is used in the config and calls
+ * ap_reserve_module_slots() accordingly.
+ * @param directive The name of the directive
+ */
+AP_DECLARE(void) ap_reserve_module_slots_directive(const char *directive);
/* For http_request.c... */
@@ -789,7 +1011,7 @@ AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server);
* @param p The pool to allocate the config vector from
* @return The config vector
*/
-AP_CORE_DECLARE(ap_conf_vector_t*) ap_create_request_config(apr_pool_t *p);
+AP_DECLARE(ap_conf_vector_t*) ap_create_request_config(apr_pool_t *p);
/**
* Setup the config vector for per dir module configs
@@ -808,6 +1030,24 @@ AP_CORE_DECLARE(ap_conf_vector_t*) ap_merge_per_dir_configs(apr_pool_t *p,
ap_conf_vector_t *base,
ap_conf_vector_t *new_conf);
+/**
+ * Allocate new ap_logconf and make (deep) copy of old ap_logconf
+ * @param p The pool to alloc from
+ * @param old The ap_logconf to copy (may be NULL)
+ * @return The new ap_logconf struct
+ */
+AP_DECLARE(struct ap_logconf *) ap_new_log_config(apr_pool_t *p,
+ const struct ap_logconf *old);
+
+/**
+ * Merge old ap_logconf into new ap_logconf.
+ * old and new must have the same life time.
+ * @param old_conf The ap_logconf to merge from
+ * @param new_conf The ap_logconf to merge into
+ */
+AP_DECLARE(void) ap_merge_log_config(const struct ap_logconf *old_conf,
+ struct ap_logconf *new_conf);
+
/* For http_connection.c... */
/**
* Setup the config vector for a connection_rec
@@ -816,20 +1056,24 @@ AP_CORE_DECLARE(ap_conf_vector_t*) ap_merge_per_dir_configs(apr_pool_t *p,
*/
AP_CORE_DECLARE(ap_conf_vector_t*) ap_create_conn_config(apr_pool_t *p);
-/* For http_core.c... ( command and virtual hosts) */
+/* For http_core.c... (<Directory> command and virtual hosts) */
/**
* parse an htaccess file
- * @param resulting htaccess_result
+ * @param result htaccess_result
* @param r The request currently being served
* @param override Which overrides are active
+ * @param override_opts Which allow-override-opts bits are set
* @param path The path to the htaccess file
* @param access_name The list of possible names for .htaccess files
* int The status of the current request
*/
-AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result,
- request_rec *r, int override,
- const char *path, const char *access_name);
+AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result,
+ request_rec *r,
+ int override,
+ int override_opts,
+ const char *path,
+ const char *access_name);
/**
* Setup a virtual host
@@ -839,19 +1083,41 @@ AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result,
* @param ps Place to store the new server_rec
* return Error string on error, NULL on success
*/
-AP_CORE_DECLARE(const char *) ap_init_virtual_host(apr_pool_t *p, const char *hostname,
- server_rec *main_server, server_rec **);
+AP_CORE_DECLARE(const char *) ap_init_virtual_host(apr_pool_t *p,
+ const char *hostname,
+ server_rec *main_server,
+ server_rec **ps);
/**
- * Process the config file for Apache
+ * Process a config file for Apache
* @param s The server rec to use for the command parms
* @param fname The name of the config file
* @param conftree The root node of the created config tree
* @param p Pool for general allocation
- * @param ptem Pool for temporary allocation
+ * @param ptemp Pool for temporary allocation
+ */
+AP_DECLARE(const char *) ap_process_resource_config(server_rec *s,
+ const char *fname,
+ ap_directive_t **conftree,
+ apr_pool_t *p,
+ apr_pool_t *ptemp);
+
+/**
+ * Process all matching files as Apache configs
+ * @param s The server rec to use for the command parms
+ * @param fname The filename pattern of the config file
+ * @param conftree The root node of the created config tree
+ * @param p Pool for general allocation
+ * @param ptemp Pool for temporary allocation
+ * @param optional Whether a no-match wildcard is allowed
+ * @see apr_fnmatch for pattern handling
*/
-AP_DECLARE(void) ap_process_resource_config(server_rec *s, const char *fname,
- ap_directive_t **conftree, apr_pool_t *p, apr_pool_t *ptemp);
+AP_DECLARE(const char *) ap_process_fnmatch_configs(server_rec *s,
+ const char *fname,
+ ap_directive_t **conftree,
+ apr_pool_t *p,
+ apr_pool_t *ptemp,
+ int optional);
/**
* Process all directives in the config tree
@@ -859,9 +1125,27 @@ AP_DECLARE(void) ap_process_resource_config(server_rec *s, const char *fname,
* @param conftree The config tree to process
* @param p The pool for general allocation
* @param ptemp The pool for temporary allocations
+ * @return OK if no problems
+ */
+AP_DECLARE(int) ap_process_config_tree(server_rec *s,
+ ap_directive_t *conftree,
+ apr_pool_t *p,
+ apr_pool_t *ptemp);
+
+/**
+ * Store data which will be retained across unload/load of modules
+ * @param key The unique key associated with this module's retained data
+ * @param size in bytes of the retained data (to be allocated)
+ * @return Address of new retained data structure, initially cleared
+ */
+AP_DECLARE(void *) ap_retained_data_create(const char *key, apr_size_t size);
+
+/**
+ * Retrieve data which was stored by ap_retained_data_create()
+ * @param key The unique key associated with this module's retained data
+ * @return Address of previously retained data structure, or NULL if not yet saved
*/
-AP_DECLARE(void) ap_process_config_tree(server_rec *s, ap_directive_t *conftree,
- apr_pool_t *p, apr_pool_t *ptemp);
+AP_DECLARE(void *) ap_retained_data_get(const char *key);
/* Module-method dispatchers, also for http_request.c */
/**
@@ -880,7 +1164,8 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r);
* @param cmds The table to search
* @return The directive definition of the specified directive
*/
-AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name, const command_rec *cmds);
+AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name,
+ const command_rec *cmds);
/**
* Find a given directive in a list module
@@ -888,7 +1173,8 @@ AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name, const com
* @param mod The module list to search
* @return The directive definition of the specified directive
*/
-AP_CORE_DECLARE(const command_rec *) ap_find_command_in_modules(const char *cmd_name, module **mod);
+AP_CORE_DECLARE(const command_rec *) ap_find_command_in_modules(const char *cmd_name,
+ module **mod);
/**
* Ask a module to create per-server and per-section (dir/loc/file) configs
@@ -906,8 +1192,6 @@ AP_CORE_DECLARE(void *) ap_set_config_vectors(server_rec *server,
const char *section,
module *mod, apr_pool_t *pconf);
-#endif
-
/* Hooks */
/**
@@ -922,8 +1206,29 @@ AP_DECLARE_HOOK(int,header_parser,(request_rec *r))
* @param pconf The config pool
* @param plog The logging streams pool
* @param ptemp The temporary pool
+ * @return OK or DECLINED on success anything else is a error
+ */
+AP_DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog,
+ apr_pool_t *ptemp))
+
+/**
+ * Run the check_config function for each module
+ * @param pconf The config pool
+ * @param plog The logging streams pool
+ * @param ptemp The temporary pool
+ * @param s the server to operate upon
+ * @return OK or DECLINED on success anything else is a error
+ */
+AP_DECLARE_HOOK(int,check_config,(apr_pool_t *pconf, apr_pool_t *plog,
+ apr_pool_t *ptemp, server_rec *s))
+
+/**
+ * Run the test_config function for each module; this hook is run
+ * only if the server was invoked to test the configuration syntax.
+ * @param pconf The config pool
+ * @param s The list of server_recs
*/
-AP_DECLARE_HOOK(void,pre_config,(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t *ptemp))
+AP_DECLARE_HOOK(void,test_config,(apr_pool_t *pconf, server_rec *s))
/**
* Run the post_config function for each module
@@ -931,8 +1236,10 @@ AP_DECLARE_HOOK(void,pre_config,(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t *
* @param plog The logging streams pool
* @param ptemp The temporary pool
* @param s The list of server_recs
+ * @return OK or DECLINED on success anything else is a error
*/
-AP_DECLARE_HOOK(void,post_config,(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t *ptemp,server_rec *s))
+AP_DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog,
+ apr_pool_t *ptemp,server_rec *s))
/**
* Run the open_logs functions for each module
@@ -940,13 +1247,15 @@ AP_DECLARE_HOOK(void,post_config,(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t
* @param plog The logging streams pool
* @param ptemp The temporary pool
* @param s The list of server_recs
+ * @return OK or DECLINED on success anything else is a error
*/
-AP_DECLARE_HOOK(void,open_logs,(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t *ptemp,server_rec *s))
+AP_DECLARE_HOOK(int,open_logs,(apr_pool_t *pconf,apr_pool_t *plog,
+ apr_pool_t *ptemp,server_rec *s))
/**
* Run the child_init functions for each module
* @param pchild The child pool
- * @param s The list of server_recs in this server
+ * @param s The list of server_recs in this server
*/
AP_DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))
@@ -962,9 +1271,13 @@ AP_DECLARE_HOOK(int,handler,(request_rec *r))
* is run before any other requests hooks are called (location_walk,
* directory_walk, access checking, et. al.). This hook was added
* to provide a quick way to serve content from a URI keyed cache.
+ *
* @param r The request_rec
+ * @param lookup_uri Controls whether the caller actually wants content or not.
+ * lookup is set when the quick_handler is called out of
+ * ap_sub_req_lookup_uri()
*/
-AP_DECLARE_HOOK(int,quick_handler,(request_rec *r))
+AP_DECLARE_HOOK(int,quick_handler,(request_rec *r, int lookup_uri))
/**
* Retrieve the optional functions for each module.
@@ -973,8 +1286,17 @@ AP_DECLARE_HOOK(int,quick_handler,(request_rec *r))
*/
AP_DECLARE_HOOK(void,optional_fn_retrieve,(void))
+/**
+ * A generic pool cleanup that will reset a pointer to NULL. For use with
+ * apr_pool_cleanup_register.
+ * @param data The address of the pointer
+ * @return APR_SUCCESS
+ */
+AP_DECLARE_NONSTD(apr_status_t) ap_pool_cleanup_set_null(void *data);
+
#ifdef __cplusplus
}
#endif
-#endif /* !APACHE_HTTP_CONFIG_H */
+#endif /* !APACHE_HTTP_CONFIG_H */
+/** @} */