diff options
Diffstat (limited to 'modules/generators/mod_info.c')
-rw-r--r-- | modules/generators/mod_info.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c index e5e63de..1662242 100644 --- a/modules/generators/mod_info.c +++ b/modules/generators/mod_info.c @@ -80,9 +80,9 @@ typedef struct module AP_MODULE_DECLARE_DATA info_module; /* current file name when doing -DDUMP_CONFIG */ -const char *dump_config_fn_info; +static const char *dump_config_fn_info; /* file handle when doing -DDUMP_CONFIG */ -apr_file_t *out = NULL; +static apr_file_t *out = NULL; static void *create_info_config(apr_pool_t * p, server_rec * s) { @@ -230,7 +230,7 @@ static int mod_info_has_cmd(const command_rec * cmds, ap_directive_t * dir) if (cmds == NULL) return 1; for (cmd = cmds; cmd->name; ++cmd) { - if (strcasecmp(cmd->name, dir->directive) == 0) + if (ap_cstr_casecmp(cmd->name, dir->directive) == 0) return 1; } return 0; @@ -297,7 +297,7 @@ typedef struct hook_get_t get; } hook_lookup_t; -static hook_lookup_t startup_hooks[] = { +static const hook_lookup_t startup_hooks[] = { {"Pre-Config", ap_hook_get_pre_config}, {"Check Configuration", ap_hook_get_check_config}, {"Test Configuration", ap_hook_get_test_config}, @@ -311,7 +311,7 @@ static hook_lookup_t startup_hooks[] = { {NULL}, }; -static hook_lookup_t request_hooks[] = { +static const hook_lookup_t request_hooks[] = { {"Pre-Connection", ap_hook_get_pre_connection}, {"Create Connection", ap_hook_get_create_connection}, {"Process Connection", ap_hook_get_process_connection}, @@ -322,6 +322,7 @@ static hook_lookup_t request_hooks[] = { {"HTTP Scheme", ap_hook_get_http_scheme}, {"Default Port", ap_hook_get_default_port}, {"Quick Handler", ap_hook_get_quick_handler}, + {"Pre-Translate Name", ap_hook_get_pre_translate_name}, {"Translate Name", ap_hook_get_translate_name}, {"Map to Storage", ap_hook_get_map_to_storage}, {"Check Access", ap_hook_get_access_checker_ex}, @@ -339,7 +340,7 @@ static hook_lookup_t request_hooks[] = { {NULL}, }; -static hook_lookup_t other_hooks[] = { +static const hook_lookup_t other_hooks[] = { {"Monitor", ap_hook_get_monitor}, {"Child Status", ap_hook_get_child_status}, {"End Generation", ap_hook_get_end_generation}, @@ -378,7 +379,7 @@ static int module_find_hook(module * modp, hook_get_t hook_get) static void module_participate(request_rec * r, module * modp, - hook_lookup_t * lookup, int *comma) + const hook_lookup_t *lookup, int *comma) { if (module_find_hook(modp, lookup->get)) { if (*comma) { @@ -454,6 +455,12 @@ static int show_server_settings(request_rec * r) "<tt>%s</tt></dt>\n", APU_VERSION_STRING); #endif ap_rprintf(r, + "<dt><strong>Server loaded PCRE Version:</strong> " + "<tt>%s</tt></dt>\n", ap_pcre_version_string(AP_REG_PCRE_LOADED)); + ap_rprintf(r, + "<dt><strong>Compiled with PCRE Version:</strong> " + "<tt>%s</tt></dt>\n", ap_pcre_version_string(AP_REG_PCRE_COMPILED)); + ap_rprintf(r, "<dt><strong>Module Magic Number:</strong> " "<tt>%d:%d</tt></dt>\n", MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR); @@ -577,7 +584,7 @@ static int show_server_settings(request_rec * r) #ifdef BUFFERED_LOGS ap_rputs(" -D BUFFERED_LOGS\n", r); #ifdef PIPE_BUF - ap_rputs(" -D PIPE_BUF=%ld\n", (long) PIPE_BUF, r); + ap_rprintf(r, " -D PIPE_BUF=%ld\n", (long) PIPE_BUF); #endif #endif @@ -785,7 +792,7 @@ static int display_info(request_rec * r) " <title>Server Information</title>\n" "</head>\n", r); ap_rputs("<body><h1 style=\"text-align: center\">" "Apache Server Information</h1>\n", r); - if (!r->args || strcasecmp(r->args, "list")) { + if (!r->args || ap_cstr_casecmp(r->args, "list")) { if (!r->args) { ap_rputs("<dl><dt><tt>Subpages:<br />", r); ap_rputs("<a href=\"?config\">Configuration Files</a>, " @@ -819,19 +826,19 @@ static int display_info(request_rec * r) ap_rputs("</tt></dt></dl><hr />", r); } - if (!r->args || !strcasecmp(r->args, "server")) { + if (!r->args || !ap_cstr_casecmp(r->args, "server")) { show_server_settings(r); } - if (!r->args || !strcasecmp(r->args, "hooks")) { + if (!r->args || !ap_cstr_casecmp(r->args, "hooks")) { show_active_hooks(r); } - if (!r->args || !strcasecmp(r->args, "providers")) { + if (!r->args || !ap_cstr_casecmp(r->args, "providers")) { show_providers(r); } - if (r->args && 0 == strcasecmp(r->args, "config")) { + if (r->args && 0 == ap_cstr_casecmp(r->args, "config")) { ap_rputs("<dl><dt><strong>Configuration:</strong>\n", r); mod_info_module_cmds(r, NULL, ap_conftree, 0, 0); ap_rputs("</dl><hr />", r); @@ -842,7 +849,7 @@ static int display_info(request_rec * r) modules = get_sorted_modules(r->pool); for (i = 0; i < modules->nelts; i++) { modp = APR_ARRAY_IDX(modules, i, module *); - if (!r->args || !strcasecmp(modp->name, r->args)) { + if (!r->args || !ap_cstr_casecmp(modp->name, r->args)) { ap_rprintf(r, "<dl><dt><a name=\"%s\"><strong>Module Name:</strong></a> " "<font size=\"+1\"><tt><a href=\"?%s\">%s</a></tt></font></dt>\n", @@ -940,7 +947,7 @@ static int display_info(request_rec * r) } } } - if (!modp && r->args && strcasecmp(r->args, "server")) { + if (!modp && r->args && ap_cstr_casecmp(r->args, "server")) { ap_rputs("<p><b>No such module</b></p>\n", r); } } |