When generating the current configuration section, we need to skip
over container directives such as <Directory> and <Location> because
these are printed out when we enter a child in the configuration tree.
The core defines these containers, that is why they are getting printed
twice. A patch is attached to fix this. I am also seeing some other
anomalies with the info module, but I will need to find some time to
investigate them.
-Ryan
On Sun, Feb 25, 2001 at 11:01:59PM -0600, William A. Rowe, Jr. wrote:
> Anyone else observe that mod_info, http_core.c section, reports
>
> <Directory />
>
> <Directory />
>
>
> twice per <Directory > block? The contents aren't repeated, just
> the start tag. (single end tag, as well.)
>
Index: mod_info.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/generators/mod_info.c,v
retrieving revision 1.28
diff -u -r1.28 mod_info.c
--- mod_info.c 2001/02/16 04:26:38 1.28
+++ mod_info.c 2001/02/26 21:29:19
@@ -193,7 +193,8 @@
while (tmptree != NULL) {
cmd = cmds;
while (cmd->name) {
- if (!strcasecmp(cmd->name, tmptree->directive)) {
+ if ((cmd->name[0] != '<') &&
+ (strcasecmp(cmd->name, tmptree->directive) == 0)) {
if (nest > block_start) {
block_start++;
apr_snprintf(htmlstring, sizeof(htmlstring), "%s %s",