X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=include%2Fhttp_config.h;h=aec29d3e695f8e973402b06b2e8db54f65f6ac21;hb=cdb37c5e4d684dd22c702a1d8ae65ab875603d40;hp=f7896bc9d01825c40e8a9b2209cc10da47e2fe95;hpb=4598f1a7d4f54711c1f8b04152bb4384c99db060;p=apache diff --git a/include/http_config.h b/include/http_config.h index f7896bc9d0..aec29d3e69 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -26,7 +26,6 @@ #ifndef APACHE_HTTP_CONFIG_H #define APACHE_HTTP_CONFIG_H -#include "apr_hooks.h" #include "util_cfgtree.h" #include "ap_config.h" @@ -47,23 +46,23 @@ extern "C" { * or whatever... */ enum cmd_how { - RAW_ARGS, /**< cmd_func parses command line itself */ - TAKE1, /**< one argument only */ - TAKE2, /**< two arguments only */ - ITERATE, /**< one argument, occuring multiple times - * (e.g., IndexIgnore) - */ - ITERATE2, /**< two arguments, 2nd occurs multiple times - * (e.g., AddIcon) - */ - FLAG, /**< One of 'On' or 'Off' */ - NO_ARGS, /**< No args at all, e.g. </Directory> */ - TAKE12, /**< one or two arguments */ - TAKE3, /**< three arguments only */ - TAKE23, /**< two or three arguments */ - TAKE123, /**< one, two or three arguments */ - TAKE13, /**< one or three arguments */ - TAKE_ARGV /**< an argc and argv are passed */ + RAW_ARGS, /**< cmd_func parses command line itself */ + TAKE1, /**< one argument only */ + TAKE2, /**< two arguments only */ + ITERATE, /**< one argument, occuring multiple times + * (e.g., IndexIgnore) + */ + ITERATE2, /**< two arguments, 2nd occurs multiple times + * (e.g., AddIcon) + */ + FLAG, /**< One of 'On' or 'Off' */ + NO_ARGS, /**< No args at all, e.g. </Directory> */ + TAKE12, /**< one or two arguments */ + TAKE3, /**< three arguments only */ + TAKE23, /**< two or three arguments */ + TAKE123, /**< one, two or three arguments */ + TAKE13, /**< one or three arguments */ + TAKE_ARGV /**< an argc and argv are passed */ }; /** @@ -75,7 +74,7 @@ typedef struct cmd_parms_struct cmd_parms; #if defined(AP_HAVE_DESIGNATED_INITIALIZER) || defined(DOXYGEN) -/** +/** * All the types of functions that can be used in directives * @internal */ @@ -84,36 +83,36 @@ typedef union { const char *(*no_args) (cmd_parms *parms, void *mconfig); /** function to call for a raw-args */ const char *(*raw_args) (cmd_parms *parms, void *mconfig, - const char *args); + const char *args); /** function to call for a argv/argc */ const char *(*take_argv) (cmd_parms *parms, void *mconfig, - int argc, char *const argv[]); + int argc, char *const argv[]); /** function to call for a take1 */ const char *(*take1) (cmd_parms *parms, void *mconfig, const char *w); /** function to call for a take2 */ const char *(*take2) (cmd_parms *parms, void *mconfig, const char *w, - const char *w2); + const char *w2); /** function to call for a take3 */ const char *(*take3) (cmd_parms *parms, void *mconfig, const char *w, - const char *w2, const char *w3); + const char *w2, const char *w3); /** function to call for a flag */ const char *(*flag) (cmd_parms *parms, void *mconfig, int on); } cmd_func; /** This configuration directive does not take any arguments */ -# define AP_NO_ARGS func.no_args +# define AP_NO_ARGS func.no_args /** This configuration directive will handle its own parsing of arguments*/ -# define AP_RAW_ARGS func.raw_args +# define AP_RAW_ARGS func.raw_args /** This configuration directive will handle its own parsing of arguments*/ -# define AP_TAKE_ARGV func.take_argv +# define AP_TAKE_ARGV func.take_argv /** This configuration directive takes 1 argument*/ -# define AP_TAKE1 func.take1 +# define AP_TAKE1 func.take1 /** This configuration directive takes 2 arguments */ -# define AP_TAKE2 func.take2 +# define AP_TAKE2 func.take2 /** This configuration directive takes 3 arguments */ -# define AP_TAKE3 func.take3 +# define AP_TAKE3 func.take3 /** This configuration directive takes a flag (on/off) as a argument*/ -# define AP_FLAG func.flag +# define AP_FLAG func.flag /** mechanism for declaring a directive with no arguments */ # define AP_INIT_NO_ARGS(directive, func, mconfig, where, help) \ @@ -200,14 +199,14 @@ typedef const char *(*cmd_func) (); * The command record structure. Each modules can define a table of these * to define the directives it will implement. */ -typedef struct command_struct command_rec; +typedef struct command_struct command_rec; struct command_struct { /** Name of this command */ const char *name; /** The function to be called when this directive is parsed */ cmd_func func; /** Extra data, for functions which implement multiple commands... */ - void *cmd_data; + void *cmd_data; /** What overrides need to be allowed to enable this command. */ int req_override; /** What the command expects as arguments */ @@ -226,20 +225,20 @@ struct command_struct { * @{ */ #define OR_NONE 0 /**< *.conf is not available anywhere in this override */ -#define OR_LIMIT 1 /**< *.conf inside <Directory> or <Location> - and .htaccess when AllowOverride Limit */ +#define OR_LIMIT 1 /**< *.conf inside <Directory> or <Location> + and .htaccess when AllowOverride Limit */ #define OR_OPTIONS 2 /**< *.conf anywhere and .htaccess when AllowOverride Options */ #define OR_FILEINFO 4 /**< *.conf anywhere - and .htaccess when AllowOverride FileInfo */ + and .htaccess when AllowOverride FileInfo */ #define OR_AUTHCFG 8 /**< *.conf inside <Directory> or <Location> - and .htaccess when AllowOverride AuthConfig */ + and .htaccess when AllowOverride AuthConfig */ #define OR_INDEXES 16 /**< *.conf anywhere - and .htaccess when AllowOverride Indexes */ -#define OR_UNSET 32 /**< unset a directive (in Allow) */ + and .htaccess when AllowOverride Indexes */ +#define OR_UNSET 32 /**< bit to indicate that AllowOverride has not been set */ #define ACCESS_CONF 64 /**< *.conf inside <Directory> or <Location> */ -#define RSRC_CONF 128 /**< *.conf outside <Directory> or <Location> */ -#define EXEC_ON_READ 256 /**< force directive to execute a command +#define RSRC_CONF 128 /**< *.conf outside <Directory> or <Location> */ +#define EXEC_ON_READ 256 /**< force directive to execute a command which would modify the configuration (like including another file, or IFModule */ /** this directive can be placed anywhere */ @@ -257,13 +256,18 @@ struct command_struct { /** Common structure for reading of config files / passwd files etc. */ typedef struct ap_configfile_t ap_configfile_t; struct ap_configfile_t { - int (*getch) (void *param); /**< a getc()-like function */ - void *(*getstr) (void *buf, size_t bufsiz, void *param); - /**< a fgets()-like function */ - int (*close) (void *param); /**< a close handler function */ - void *param; /**< the argument passed to getch/getstr/close */ - const char *name; /**< the filename / description */ - unsigned line_number; /**< current line number, starting at 1 */ + /**< an apr_file_getc()-like function */ + apr_status_t (*getch) (char *ch, void *param); + /**< an apr_file_gets()-like function */ + apr_status_t (*getstr) (void *buf, size_t bufsiz, void *param); + /**< a close handler function */ + apr_status_t (*close) (void *param); + /**< the argument passed to getch/getstr/close */ + void *param; + /**< the filename / description */ + const char *name; + /**< current line number, starting at 1 */ + unsigned line_number; }; /** @@ -292,16 +296,16 @@ struct cmd_parms_struct { /** Pool to allocate new storage in */ apr_pool_t *pool; - /** Pool for scratch memory; persists during configuration, but + /** Pool for scratch memory; persists during configuration, but * wiped before the first request is served... */ apr_pool_t *temp_pool; /** Server_rec being configured for */ server_rec *server; - /** If configuring for a directory, pathname of that directory. - * NOPE! That's what it meant previous to the existence of <Files>, - * <Location> and regex matching. Now the only usefulness that can be - * derived from this field is whether a command is being called in a - * server context (path == NULL) or being called in a dir context + /** If configuring for a directory, pathname of that directory. + * NOPE! That's what it meant previous to the existence of <Files>, + * <Location> and regex matching. Now the only usefulness that can be + * derived from this field is whether a command is being called in a + * server context (path == NULL) or being called in a dir context * (path != NULL). */ char *path; /** configuration command */ @@ -321,11 +325,11 @@ struct cmd_parms_struct { */ typedef struct module_struct module; struct module_struct { - /** API version, *not* module version; check that module is + /** API version, *not* module version; check that module is * compatible with this version of the server. */ int version; - /** API minor version. Provides API feature milestones. Not checked + /** API minor version. Provides API feature milestones. Not checked * during module init */ int minor_version; /** Index to this modules structures in config vectors. */ @@ -341,7 +345,7 @@ struct module_struct { */ struct module_struct *next; - /** Magic Cookie to identify a module structure; It's mainly + /** Magic Cookie to identify a module structure; It's mainly * important for the DSO facility (see also mod_so). */ unsigned long magic; @@ -379,7 +383,7 @@ struct module_struct { * @param new_conf The directory structure currently being processed. * @return The new per-directory structure created */ - void *(*merge_server_config) (apr_pool_t *p, void *base_conf, + void *(*merge_server_config) (apr_pool_t *p, void *base_conf, void *new_conf); /** A command_rec table that describes all of the directives this module @@ -402,7 +406,7 @@ struct module_struct { * APLOG_USE_MODULE indirectly sets APLOG_MODULE_INDEX and APLOG_MARK. * * If a module should be backward compatible with versions before 2.3.6, - * APLOG_USE_MODULE needs to be enclosed in a #ifdef APLOG_USE_MODULE block. + * APLOG_USE_MODULE needs to be enclosed in a ifdef APLOG_USE_MODULE block. * * @param foo name of the module symbol of the current module, without the * trailing "_module" part @@ -438,26 +442,26 @@ struct module_struct { */ /** The one used in Apache 1.3, which will deliberately cause an error */ -#define STANDARD_MODULE_STUFF this_module_needs_to_be_ported_to_apache_2_0 +#define STANDARD_MODULE_STUFF this_module_needs_to_be_ported_to_apache_2_0 /** Use this in all standard modules */ -#define STANDARD20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \ - MODULE_MAGIC_NUMBER_MINOR, \ - -1, \ - __FILE__, \ - NULL, \ - NULL, \ - MODULE_MAGIC_COOKIE, \ +#define STANDARD20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \ + MODULE_MAGIC_NUMBER_MINOR, \ + -1, \ + __FILE__, \ + NULL, \ + NULL, \ + MODULE_MAGIC_COOKIE, \ NULL /* rewrite args spot */ /** Use this only in MPMs */ -#define MPM20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \ - MODULE_MAGIC_NUMBER_MINOR, \ - -1, \ - __FILE__, \ - NULL, \ - NULL, \ - MODULE_MAGIC_COOKIE +#define MPM20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \ + MODULE_MAGIC_NUMBER_MINOR, \ + -1, \ + __FILE__, \ + NULL, \ + NULL, \ + MODULE_MAGIC_COOKIE /** @} */ @@ -490,9 +494,9 @@ AP_DECLARE(void) ap_set_module_config(ap_conf_vector_t *cv, const module *m, #if !defined(AP_DEBUG) -#define ap_get_module_config(v,m) \ +#define ap_get_module_config(v,m) \ (((void **)(v))[(m)->module_index]) -#define ap_set_module_config(v,m,val) \ +#define ap_set_module_config(v,m,val) \ ((((void **)(v))[(m)->module_index]) = (val)) #endif /* AP_DEBUG */ @@ -593,7 +597,7 @@ AP_DECLARE(void) ap_reset_module_loglevels(struct ap_logconf *l, int val); * @param arg The argument to the directive * @return An error string or NULL on success */ -AP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd, +AP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd, void *struct_ptr, const char *arg); @@ -604,7 +608,7 @@ AP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd, * @param arg The argument to the directive * @return An error string or NULL on success */ -AP_DECLARE_NONSTD(const char *) ap_set_int_slot(cmd_parms *cmd, +AP_DECLARE_NONSTD(const char *) ap_set_int_slot(cmd_parms *cmd, void *struct_ptr, const char *arg); @@ -636,8 +640,8 @@ 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, +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 @@ -646,8 +650,8 @@ AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd, * @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, +AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, + void *struct_ptr, int arg); /** * Generic command handling function for flags stored in a char @@ -656,8 +660,8 @@ AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, * @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_char(cmd_parms *cmd, - void *struct_ptr, +AP_DECLARE_NONSTD(const char *) ap_set_flag_slot_char(cmd_parms *cmd, + void *struct_ptr, int arg); /** * Generic command handling function for files @@ -666,8 +670,8 @@ AP_DECLARE_NONSTD(const char *) ap_set_flag_slot_char(cmd_parms *cmd, * @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, +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 @@ -677,12 +681,12 @@ AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, * @return The cmd->help value as the error string * @note This allows simple declarations such as: * @code - * AP_INIT_RAW_ARGS("Foo", ap_set_deprecated, NULL, OR_ALL, + * 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, +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 @@ -750,11 +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, +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 @@ -762,28 +766,30 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg, * @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, +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 @@ -792,9 +798,19 @@ AP_DECLARE(int) ap_cfg_getc(ap_configfile_t *cfp); */ AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp); +/** + * 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. + * 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 @@ -812,7 +828,7 @@ 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, +AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p, apr_pool_t *temp_pool, cmd_parms *parms, ap_directive_t **current, @@ -853,7 +869,7 @@ AP_DECLARE(const char *) ap_walk_config(ap_directive_t *conftree, * @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, +AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden); #define NOT_IN_VIRTUALHOST 0x01 /**< Forbidden in <VirtualHost> */ @@ -862,9 +878,9 @@ AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd, #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) +#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) +#define GLOBAL_ONLY (NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE) /** @} */ @@ -909,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... */ @@ -926,12 +942,12 @@ AP_DECLARE(const char *) 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 */ @@ -945,9 +961,9 @@ 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_DECLARE(server_rec *) ap_read_config(process_rec *process, + apr_pool_t *temp_pool, + const char *config_name, ap_directive_t **conftree); /** @@ -968,9 +984,26 @@ 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, +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... */ /** @@ -978,7 +1011,7 @@ AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, * @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 @@ -1035,11 +1068,11 @@ AP_CORE_DECLARE(ap_conf_vector_t*) ap_create_conn_config(apr_pool_t *p); * @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, +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 *path, const char *access_name); /** @@ -1050,9 +1083,9 @@ 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, +AP_CORE_DECLARE(const char *) ap_init_virtual_host(apr_pool_t *p, const char *hostname, - server_rec *main_server, + server_rec *main_server, server_rec **ps); /** @@ -1113,7 +1146,7 @@ AP_DECLARE(void *) ap_retained_data_create(const char *key, apr_size_t size); * @return Address of previously retained data structure, or NULL if not yet saved */ AP_DECLARE(void *) ap_retained_data_get(const char *key); - + /* Module-method dispatchers, also for http_request.c */ /** * Run the handler phase of each module until a module accepts the @@ -1131,7 +1164,7 @@ 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, +AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name, const command_rec *cmds); /** @@ -1140,7 +1173,7 @@ AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name, * @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, +AP_CORE_DECLARE(const command_rec *) ap_find_command_in_modules(const char *cmd_name, module **mod); /** @@ -1222,7 +1255,7 @@ AP_DECLARE_HOOK(int,open_logs,(apr_pool_t *pconf,apr_pool_t *plog, /** * 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)) @@ -1238,10 +1271,10 @@ 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 + * 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, int lookup_uri)) @@ -1265,5 +1298,5 @@ AP_DECLARE_NONSTD(apr_status_t) ap_pool_cleanup_set_null(void *data); } #endif -#endif /* !APACHE_HTTP_CONFIG_H */ +#endif /* !APACHE_HTTP_CONFIG_H */ /** @} */