]> granicus.if.org Git - apache/blob - modules/generators/mod_info.c
Remove ap_excess_requests_per_child reference that broke compilation,
[apache] / modules / generators / mod_info.c
1 /* ====================================================================
2  * Copyright (c) 1995-1999 The Apache Group.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer. 
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in
13  *    the documentation and/or other materials provided with the
14  *    distribution.
15  *
16  * 3. All advertising materials mentioning features or use of this
17  *    software must display the following acknowledgment:
18  *    "This product includes software developed by the Apache Group
19  *    for use in the Apache HTTP server project (http://www.apache.org/)."
20  *
21  * 4. The names "Apache Server" and "Apache Group" must not be used to
22  *    endorse or promote products derived from this software without
23  *    prior written permission. For written permission, please contact
24  *    apache@apache.org.
25  *
26  * 5. Products derived from this software may not be called "Apache"
27  *    nor may "Apache" appear in their names without prior written
28  *    permission of the Apache Group.
29  *
30  * 6. Redistributions of any form whatsoever must retain the following
31  *    acknowledgment:
32  *    "This product includes software developed by the Apache Group
33  *    for use in the Apache HTTP server project (http://www.apache.org/)."
34  *
35  * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
36  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
38  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
39  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
42  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
44  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
45  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
46  * OF THE POSSIBILITY OF SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This software consists of voluntary contributions made by many
50  * individuals on behalf of the Apache Group and was originally based
51  * on public domain software written at the National Center for
52  * Supercomputing Applications, University of Illinois, Urbana-Champaign.
53  * For more information on the Apache Group and the Apache HTTP server
54  * project, please see <http://www.apache.org/>.
55  *
56  */
57
58 /* 
59  * Info Module.  Display configuration information for the server and
60  * all included modules.
61  *
62  * <Location /server-info>
63  * SetHandler server-info
64  * </Location>
65  *
66  * GET /server-info - Returns full configuration page for server and all modules
67  * GET /server-info?server - Returns server configuration only
68  * GET /server-info?module_name - Returns configuration for a single module
69  * GET /server-info?list - Returns quick list of included modules
70  *
71  * Rasmus Lerdorf <rasmus@vex.net>, May 1996
72  *
73  * 05.01.96 Initial Version
74  *
75  * Lou Langholtz <ldl@usi.utah.edu>, July 1997
76  *
77  * 07.11.97 Addition of the AddModuleInfo directive
78  * 
79  */
80
81 #include "httpd.h"
82 #include "http_config.h"
83 #include "http_core.h"
84 #include "http_log.h"
85 #include "http_main.h"
86 #include "http_protocol.h"
87 #include "util_script.h"
88 #include "http_conf_globals.h"
89
90 typedef struct {
91     char *name;                 /* matching module name */
92     char *info;                 /* additional info */
93 } info_entry;
94
95 typedef struct {
96     array_header *more_info;
97 } info_svr_conf;
98
99 typedef struct info_cfg_lines {
100     char *cmd;
101     char *line;
102     struct info_cfg_lines *next;
103 } info_cfg_lines;
104
105 module MODULE_VAR_EXPORT info_module;
106 extern module *top_module;
107
108 static void *create_info_config(pool *p, server_rec *s)
109 {
110     info_svr_conf *conf = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf));
111
112     conf->more_info = ap_make_array(p, 20, sizeof(info_entry));
113     return conf;
114 }
115
116 static void *merge_info_config(pool *p, void *basev, void *overridesv)
117 {
118     info_svr_conf *new = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf));
119     info_svr_conf *base = (info_svr_conf *) basev;
120     info_svr_conf *overrides = (info_svr_conf *) overridesv;
121
122     new->more_info = ap_append_arrays(p, overrides->more_info, base->more_info);
123     return new;
124 }
125
126 static char *mod_info_html_cmd_string(const char *string, char *buf, size_t buf_len)
127 {
128     const char *s;
129     char *t;
130     char *end_buf;
131
132     s = string;
133     t = buf;
134     /* keep space for \0 byte */
135     end_buf = buf + buf_len - 1;
136     while ((*s) && (t < end_buf)) {
137         if (*s == '<') {
138             strncpy(t, "&lt;", end_buf - t);
139             t += 4;
140         }
141         else if (*s == '>') {
142             strncpy(t, "&gt;", end_buf - t);
143             t += 4;
144         }
145         else if (*s == '&') {
146             strncpy(t, "&amp;", end_buf - t);
147             t += 5;
148         }
149         else {
150             *t++ = *s;
151         }
152         s++;
153     }
154     /* oops, overflowed... don't overwrite */
155     if (t > end_buf) {
156         *end_buf = '\0';
157     }
158     else {
159         *t = '\0';
160     }
161     return (buf);
162 }
163
164 static info_cfg_lines *mod_info_load_config(pool *p, const char *filename,
165                                             request_rec *r)
166 {
167     char s[MAX_STRING_LEN];
168     configfile_t *fp;
169     info_cfg_lines *new, *ret, *prev;
170     const char *t;
171
172     fp = ap_pcfg_openfile(p, filename);
173     if (!fp) {
174         ap_log_rerror(APLOG_MARK, APLOG_WARNING, r, 
175                     "mod_info: couldn't open config file %s",
176                     filename);
177         return NULL;
178     }
179     ret = NULL;
180     prev = NULL;
181     while (!ap_cfg_getline(s, MAX_STRING_LEN, fp)) {
182         if (*s == '#') {
183             continue;           /* skip comments */
184         }
185         new = ap_palloc(p, sizeof(struct info_cfg_lines));
186         new->next = NULL;
187         if (!ret) {
188             ret = new;
189         }
190         if (prev) {
191             prev->next = new;
192         }
193         t = s;
194         new->cmd = ap_getword_conf(p, &t);
195         if (*t) {
196             new->line = ap_pstrdup(p, t);
197         }
198         else {
199             new->line = NULL;
200         }
201         prev = new;
202     }
203     ap_cfg_closefile(fp);
204     return (ret);
205 }
206
207 static void mod_info_module_cmds(request_rec *r, info_cfg_lines *cfg,
208                                  const command_rec *cmds, char *label)
209 {
210     const command_rec *cmd = cmds;
211     info_cfg_lines *li = cfg, *li_st = NULL, *li_se = NULL;
212     info_cfg_lines *block_start = NULL;
213     int lab = 0, nest = 0;
214     char buf[MAX_STRING_LEN];
215
216     while (li) {
217         if (!strncasecmp(li->cmd, "<directory", 10) ||
218             !strncasecmp(li->cmd, "<location", 9) ||
219             !strncasecmp(li->cmd, "<limit", 6) ||
220             !strncasecmp(li->cmd, "<files", 6)) {
221             if (nest) {
222                 li_se = li;
223             }
224             else {
225                 li_st = li;
226             }
227             li = li->next;
228             nest++;
229             continue;
230         }
231         else if (nest && (!strncasecmp(li->cmd, "</limit", 7) ||
232                           !strncasecmp(li->cmd, "</location", 10) ||
233                           !strncasecmp(li->cmd, "</directory", 11) ||
234                           !strncasecmp(li->cmd, "</files", 7))) {
235             if (block_start) {
236                 if ((nest == 1 && block_start == li_st) ||
237                     (nest == 2 && block_start == li_se)) {
238                     ap_rputs("<dd><tt>", r);
239                     if (nest == 2) {
240                         ap_rputs("&nbsp;&nbsp;", r);
241                     }
242                     ap_rputs(mod_info_html_cmd_string(li->cmd, buf, sizeof(buf)), r);
243                     ap_rputs(" ", r);
244                     if (li->line) {
245                         ap_rputs(mod_info_html_cmd_string(li->line, buf, sizeof(buf)), r);
246                     }
247                     ap_rputs("</tt>\n", r);
248                     nest--;
249                     if (!nest) {
250                         block_start = NULL;
251                         li_st = NULL;
252                     }
253                     else {
254                         block_start = li_st;
255                     }
256                     li_se = NULL;
257                 }
258                 else {
259                     nest--;
260                     if (!nest) {
261                         li_st = NULL;
262                     }
263                     li_se = NULL;
264                 }
265             }
266             else {
267                 nest--;
268                 if (!nest) {
269                     li_st = NULL;
270                 }
271                 li_se = NULL;
272             }
273             li = li->next;
274             continue;
275         }
276         cmd = cmds;
277         while (cmd) {
278             if (cmd->name) {
279                 if (!strcasecmp(cmd->name, li->cmd)) {
280                     if (!lab) {
281                         ap_rputs("<dt><strong>", r);
282                         ap_rputs(label, r);
283                         ap_rputs("</strong>\n", r);
284                         lab = 1;
285                     }
286                     if (((nest && block_start == NULL) ||
287                          (nest == 2 && block_start == li_st)) &&
288                         (strncasecmp(li->cmd, "<directory", 10) &&
289                          strncasecmp(li->cmd, "<location", 9) &&
290                          strncasecmp(li->cmd, "<limit", 6) &&
291                          strncasecmp(li->cmd, "</limit", 7) &&
292                          strncasecmp(li->cmd, "</location", 10) &&
293                          strncasecmp(li->cmd, "</directory", 11) &&
294                          strncasecmp(li->cmd, "</files", 7))) {
295                         ap_rputs("<dd><tt>", r);
296                         ap_rputs(mod_info_html_cmd_string(li_st->cmd, buf, sizeof(buf)), r);
297                         ap_rputs(" ", r);
298                         if (li_st->line) {
299                             ap_rputs(mod_info_html_cmd_string(li_st->line, buf, sizeof(buf)), r);
300                         }
301                         ap_rputs("</tt>\n", r);
302                         block_start = li_st;
303                         if (li_se) {
304                             ap_rputs("<dd><tt>&nbsp;&nbsp;", r);
305                             ap_rputs(mod_info_html_cmd_string(li_se->cmd, buf, sizeof(buf)), r);
306                             ap_rputs(" ", r);
307                             if (li_se->line) {
308                                 ap_rputs(mod_info_html_cmd_string(li_se->line, buf, sizeof(buf)), r);
309                             }
310                             ap_rputs("</tt>\n", r);
311                             block_start = li_se;
312                         }
313                     }
314                     ap_rputs("<dd><tt>", r);
315                     if (nest) {
316                         ap_rputs("&nbsp;&nbsp;", r);
317                     }
318                     if (nest == 2) {
319                         ap_rputs("&nbsp;&nbsp;", r);
320                     }
321                     ap_rputs(mod_info_html_cmd_string(li->cmd, buf, sizeof(buf)), r);
322                     if (li->line) {
323                         ap_rputs(" <i>", r);
324                         ap_rputs(mod_info_html_cmd_string(li->line, buf, sizeof(buf)), r);
325                         ap_rputs("</i>", r);
326                     }
327                     ap_rputs("</tt>", r);
328                 }
329             }
330             else
331                 break;
332             cmd++;
333         }
334         li = li->next;
335     }
336 }
337
338 static char *find_more_info(server_rec *s, const char *module_name)
339 {
340     int i;
341     info_svr_conf *conf = (info_svr_conf *) ap_get_module_config(s->module_config,
342                                                               &info_module);
343     info_entry *entry = (info_entry *) conf->more_info->elts;
344
345     if (!module_name) {
346         return 0;
347     }
348     for (i = 0; i < conf->more_info->nelts; i++) {
349         if (!strcmp(module_name, entry->name)) {
350             return entry->info;
351         }
352         entry++;
353     }
354     return 0;
355 }
356
357 static int display_info(request_rec *r)
358 {
359     module *modp = NULL;
360     char buf[MAX_STRING_LEN], *cfname;
361     char *more_info;
362     const command_rec *cmd = NULL;
363     const handler_rec *hand = NULL;
364     server_rec *serv = r->server;
365     int comma = 0;
366     info_cfg_lines *mod_info_cfg_httpd = NULL;
367     info_cfg_lines *mod_info_cfg_srm = NULL;
368     info_cfg_lines *mod_info_cfg_access = NULL;
369
370     r->allowed |= (1 << M_GET);
371     if (r->method_number != M_GET)
372         return DECLINED;
373
374     r->content_type = "text/html";
375     ap_send_http_header(r);
376     if (r->header_only) {
377         return 0;
378     }
379
380     ap_rputs(DOCTYPE_HTML_3_2
381              "<html><head><title>Server Information</title></head>\n", r);
382     ap_rputs("<body><h1 align=center>Apache Server Information</h1>\n", r);
383     if (!r->args || strcasecmp(r->args, "list")) {
384         cfname = ap_server_root_relative(r->pool, ap_server_confname);
385         mod_info_cfg_httpd = mod_info_load_config(r->pool, cfname, r);
386         cfname = ap_server_root_relative(r->pool, serv->srm_confname);
387         mod_info_cfg_srm = mod_info_load_config(r->pool, cfname, r);
388         cfname = ap_server_root_relative(r->pool, serv->access_confname);
389         mod_info_cfg_access = mod_info_load_config(r->pool, cfname, r);
390         if (!r->args) {
391             ap_rputs("<tt><a href=\"#server\">Server Settings</a>, ", r);
392             for (modp = top_module; modp; modp = modp->next) {
393                 ap_rprintf(r, "<a href=\"#%s\">%s</a>", modp->name, modp->name);
394                 if (modp->next) {
395                     ap_rputs(", ", r);
396                 }
397             }
398             ap_rputs("</tt><hr>", r);
399
400         }
401         if (!r->args || !strcasecmp(r->args, "server")) {
402             ap_rprintf(r, "<a name=\"server\"><strong>Server Version:</strong> "
403                         "<font size=+1><tt>%s</tt></a></font><br>\n",
404                         ap_get_server_version());
405             ap_rprintf(r, "<strong>Server Built:</strong> "
406                         "<font size=+1><tt>%s</tt></a></font><br>\n",
407                         ap_get_server_built());
408             ap_rprintf(r, "<strong>API Version:</strong> "
409                         "<tt>%d:%d</tt><br>\n",
410                         MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR);
411             ap_rprintf(r, "<strong>User/Group:</strong> "
412                         "<tt>%s(%d)/%d</tt><br>\n",
413                         ap_user_name, (int) ap_user_id, (int) ap_group_id);
414             ap_rprintf(r, "<strong>Hostname/port:</strong> "
415                         "<tt>%s:%u</tt><br>\n",
416                         serv->server_hostname, serv->port);
417             ap_rprintf(r, "<strong>Daemons:</strong> "
418                         "<tt>start: %d &nbsp;&nbsp; "
419                         "min idle: %d &nbsp;&nbsp; "
420                         "max idle: %d &nbsp;&nbsp; "
421                         "max: %d</tt><br>\n",
422                         ap_daemons_to_start, ap_daemons_min_free,
423                         ap_daemons_max_free, ap_daemons_limit);
424             ap_rprintf(r, "<strong>Max Requests:</strong> "
425                         "<tt>per child: %d &nbsp;&nbsp; "
426                         "keep alive: %s &nbsp;&nbsp; "
427                         "max per connection: %d</tt><br>\n",
428                         ap_max_requests_per_child,
429                         (serv->keep_alive ? "on" : "off"),
430                         serv->keep_alive_max);
431             ap_rprintf(r, "<strong>Threads:</strong> "
432                         "<tt>per child: %d &nbsp;&nbsp; </tt><br>\n",
433                         ap_threads_per_child);
434             ap_rprintf(r, "<strong>Timeouts:</strong> "
435                         "<tt>connection: %d &nbsp;&nbsp; "
436                         "keep-alive: %d</tt><br>",
437                         serv->timeout, serv->keep_alive_timeout);
438             ap_rprintf(r, "<strong>Server Root:</strong> "
439                         "<tt>%s</tt><br>\n", ap_server_root);
440             ap_rprintf(r, "<strong>Config File:</strong> "
441                         "<tt>%s</tt><br>\n", ap_server_confname);
442             ap_rprintf(r, "<strong>PID File:</strong> "
443                         "<tt>%s</tt><br>\n", ap_pid_fname);
444             ap_rprintf(r, "<strong>Scoreboard File:</strong> "
445                         "<tt>%s</tt><br>\n", ap_scoreboard_fname);
446         }
447         ap_rputs("<hr><dl>", r);
448         for (modp = top_module; modp; modp = modp->next) {
449             if (!r->args || !strcasecmp(modp->name, r->args)) {
450                 ap_rprintf(r, "<dt><a name=\"%s\"><strong>Module Name:</strong> "
451                             "<font size=+1><tt>%s</tt></a></font>\n",
452                             modp->name, modp->name);
453                 ap_rputs("<dt><strong>Content handlers:</strong>", r);
454                 hand = modp->handlers;
455                 if (hand) {
456                     while (hand) {
457                         if (hand->content_type) {
458                             ap_rprintf(r, " <tt>%s</tt>\n", hand->content_type);
459                         }
460                         else {
461                             break;
462                         }
463                         hand++;
464                         if (hand && hand->content_type) {
465                             ap_rputs(",", r);
466                         }
467                     }
468                 }
469                 else {
470                     ap_rputs("<tt> <EM>none</EM></tt>", r);
471                 }
472                 ap_rputs("<dt><strong>Configuration Phase Participation:</strong> \n",
473                       r);
474                 if (modp->child_init) {
475                     ap_rputs("<tt>Child Init</tt>", r);
476                     comma = 1;
477                 }
478                 if (modp->create_dir_config) {
479                     if (comma) {
480                         ap_rputs(", ", r);
481                     }
482                     ap_rputs("<tt>Create Directory Config</tt>", r);
483                     comma = 1;
484                 }
485                 if (modp->merge_dir_config) {
486                     if (comma) {
487                         ap_rputs(", ", r);
488                     }
489                     ap_rputs("<tt>Merge Directory Configs</tt>", r);
490                     comma = 1;
491                 }
492                 if (modp->create_server_config) {
493                     if (comma) {
494                         ap_rputs(", ", r);
495                     }
496                     ap_rputs("<tt>Create Server Config</tt>", r);
497                     comma = 1;
498                 }
499                 if (modp->merge_server_config) {
500                     if (comma) {
501                         ap_rputs(", ", r);
502                     }
503                     ap_rputs("<tt>Merge Server Configs</tt>", r);
504                     comma = 1;
505                 }
506                 if (modp->child_exit) {
507                     if (comma) {
508                         ap_rputs(", ", r);
509                     }
510                     ap_rputs("<tt>Child Exit</tt>", r);
511                     comma = 1;
512                 }
513                 if (!comma)
514                     ap_rputs("<tt> <EM>none</EM></tt>", r);
515                 comma = 0;
516                 ap_rputs("<dt><strong>Request Phase Participation:</strong> \n",
517                       r);
518                 if (modp->post_read_request) {
519                     ap_rputs("<tt>Post-Read Request</tt>", r);
520                     comma = 1;
521                 }
522                 if (modp->header_parser) {
523                     if (comma) {
524                         ap_rputs(", ", r);
525                     }
526                     ap_rputs("<tt>Header Parse</tt>", r);
527                     comma = 1;
528                 }
529                 if (modp->translate_handler) {
530                     if (comma) {
531                         ap_rputs(", ", r);
532                     }
533                     ap_rputs("<tt>Translate Path</tt>", r);
534                     comma = 1;
535                 }
536                 if (modp->access_checker) {
537                     if (comma) {
538                         ap_rputs(", ", r);
539                     }
540                     ap_rputs("<tt>Check Access</tt>", r);
541                     comma = 1;
542                 }
543                 if (modp->ap_check_user_id) {
544                     if (comma) {
545                         ap_rputs(", ", r);
546                     }
547                     ap_rputs("<tt>Verify User ID</tt>", r);
548                     comma = 1;
549                 }
550                 if (modp->auth_checker) {
551                     if (comma) {
552                         ap_rputs(", ", r);
553                     }
554                     ap_rputs("<tt>Verify User Access</tt>", r);
555                     comma = 1;
556                 }
557                 if (modp->type_checker) {
558                     if (comma) {
559                         ap_rputs(", ", r);
560                     }
561                     ap_rputs("<tt>Check Type</tt>", r);
562                     comma = 1;
563                 }
564                 if (modp->fixer_upper) {
565                     if (comma) {
566                         ap_rputs(", ", r);
567                     }
568                     ap_rputs("<tt>Fixups</tt>", r);
569                     comma = 1;
570                 }
571                 if (modp->logger) {
572                     if (comma) {
573                         ap_rputs(", ", r);
574                     }
575                     ap_rputs("<tt>Logging</tt>", r);
576                     comma = 1;
577                 }
578                 if (!comma)
579                     ap_rputs("<tt> <EM>none</EM></tt>", r);
580                 comma = 0;
581                 ap_rputs("<dt><strong>Module Directives:</strong> ", r);
582                 cmd = modp->cmds;
583                 if (cmd) {
584                     while (cmd) {
585                         if (cmd->name) {
586                             ap_rprintf(r, "<dd><tt>%s - <i>",
587                                     mod_info_html_cmd_string(cmd->name,
588                                         buf, sizeof(buf)));
589                             if (cmd->errmsg) {
590                                 ap_rputs(cmd->errmsg, r);
591                             }
592                             ap_rputs("</i></tt>\n", r);
593                         }
594                         else {
595                             break;
596                         }
597                         cmd++;
598                     }
599                     ap_rputs("<dt><strong>Current Configuration:</strong>\n", r);
600                     mod_info_module_cmds(r, mod_info_cfg_httpd, modp->cmds,
601                                          "httpd.conf");
602                     mod_info_module_cmds(r, mod_info_cfg_srm, modp->cmds,
603                                          "srm.conf");
604                     mod_info_module_cmds(r, mod_info_cfg_access, modp->cmds,
605                                          "access.conf");
606                 }
607                 else {
608                     ap_rputs("<tt> none</tt>\n", r);
609                 }
610                 more_info = find_more_info(serv, modp->name);
611                 if (more_info) {
612                     ap_rputs("<dt><strong>Additional Information:</strong>\n<dd>",
613                           r);
614                     ap_rputs(more_info, r);
615                 }
616                 ap_rputs("<dt><hr>\n", r);
617                 if (r->args) {
618                     break;
619                 }
620             }
621         }
622         if (!modp && r->args && strcasecmp(r->args, "server")) {
623             ap_rputs("<b>No such module</b>\n", r);
624         }
625     }
626     else {
627         for (modp = top_module; modp; modp = modp->next) {
628             ap_rputs(modp->name, r);
629             if (modp->next) {
630                 ap_rputs("<br>", r);
631             }
632         }
633     }
634     ap_rputs("</dl>\n", r);
635     ap_rputs(ap_psignature("",r), r);
636     ap_rputs("</body></html>\n", r);
637     /* Done, turn off timeout, close file and return */
638     return 0;
639 }
640
641 static const char *add_module_info(cmd_parms *cmd, void *dummy, char *name,
642                                    char *info)
643 {
644     server_rec *s = cmd->server;
645     info_svr_conf *conf = (info_svr_conf *) ap_get_module_config(s->module_config,
646                                                               &info_module);
647     info_entry *new = ap_push_array(conf->more_info);
648
649     new->name = name;
650     new->info = info;
651     return NULL;
652 }
653
654 static const command_rec info_cmds[] =
655 {
656     {"AddModuleInfo", add_module_info, NULL, RSRC_CONF, TAKE2,
657      "a module name and additional information on that module"},
658     {NULL}
659 };
660
661 static const handler_rec info_handlers[] =
662 {
663     {"server-info", display_info},
664     {NULL}
665 };
666
667 module MODULE_VAR_EXPORT info_module =
668 {
669     STANDARD_MODULE_STUFF,
670     NULL,                       /* initializer */
671     NULL,                       /* dir config creater */
672     NULL,                       /* dir merger --- default is to override */
673     create_info_config,         /* server config */
674     merge_info_config,          /* merge server config */
675     info_cmds,                  /* command table */
676     info_handlers,              /* handlers */
677     NULL,                       /* filename translation */
678     NULL,                       /* check_user_id */
679     NULL,                       /* check auth */
680     NULL,                       /* check access */
681     NULL,                       /* type_checker */
682     NULL,                       /* fixups */
683     NULL,                       /* logger */
684     NULL,                       /* header parser */
685     NULL,                       /* child_init */
686     NULL,                       /* child_exit */
687     NULL                        /* post read-request */
688 };