#include "http_main.h"
#include "http_protocol.h"
#include "util_script.h"
-#include "http_conf_globals.h"
+
+#if APR_HAVE_STRINGS_H
+#include <strings.h>
+#endif
typedef struct {
const char *name; /* matching module name */
{
info_svr_conf *conf = (info_svr_conf *) apr_pcalloc(p, sizeof(info_svr_conf));
- conf->more_info = apr_make_array(p, 20, sizeof(info_entry));
+ conf->more_info = apr_array_make(p, 20, sizeof(info_entry));
return conf;
}
info_svr_conf *base = (info_svr_conf *) basev;
info_svr_conf *overrides = (info_svr_conf *) overridesv;
- new->more_info = apr_append_arrays(p, overrides->more_info, base->more_info);
+ new->more_info = apr_array_append(p, overrides->more_info, base->more_info);
return new;
}
sizeof(buf), 1));
block_start--;
}
- tmptree = tmptree->parent->next;
+ if (tmptree->parent) {
+ tmptree = tmptree->parent->next;
+ }
+ else {
+ tmptree = NULL;
+ }
nest--;
}
const char *cfname;
const char *more_info;
const command_rec *cmd = NULL;
+#ifdef NEVERMORE
const handler_rec *hand = NULL;
+#endif
server_rec *serv = r->server;
int comma = 0;
+ if (strcmp(r->handler, "server-info"))
+ return DECLINED;
+
r->allowed |= (1 << M_GET);
if (r->method_number != M_GET)
return DECLINED;
"<font size=+1><tt>%s</tt></a></font>\n",
modp->name, modp->name);
ap_rputs("<dt><strong>Content handlers:</strong>", r);
+#ifdef NEVERMORE
hand = modp->handlers;
if (hand) {
while (hand) {
else {
ap_rputs("<tt> <EM>none</EM></tt>", r);
}
+#else
+ ap_rputs("<tt> <EM>(code broken)</EM></tt>", r);
+#endif
ap_rputs("<dt><strong>Configuration Phase Participation:</strong> \n",
r);
if (modp->create_dir_config) {
server_rec *s = cmd->server;
info_svr_conf *conf = (info_svr_conf *) ap_get_module_config(s->module_config,
&info_module);
- info_entry *new = apr_push_array(conf->more_info);
+ info_entry *new = apr_array_push(conf->more_info);
new->name = name;
new->info = info;
{NULL}
};
-static const handler_rec info_handlers[] =
+static void register_hooks(apr_pool_t *p)
{
- {"server-info", display_info},
- {NULL}
-};
+ ap_hook_handler(display_info, NULL, NULL, APR_HOOK_MIDDLE);
+}
module AP_MODULE_DECLARE_DATA info_module =
{
create_info_config, /* server config */
merge_info_config, /* merge server config */
info_cmds, /* command apr_table_t */
- info_handlers, /* handlers */
- NULL, /* filename translation */
+ register_hooks
};