httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From barries <barr...@slaysys.com>
Subject [PATCH config.c] Clean up output for <Foo>...</Foo> sections
Date Thu, 03 May 2001 20:57:38 GMT
Given a pair of directives for the mythical container Foo:

<Foo>
</Foo>

httpd says:

   Expected </Foo>> but saw </Foo>

The below patch changes this to:

   Invalid command '<Foo', perhaps mis-spelled or defined by a module not included in the
server configuration

- Barrie

--- config.c.orig	Thu May  3 16:44:00 2001
+++ config.c	Thu May  3 11:58:32 2001
@@ -809,6 +809,12 @@
 	return NULL;
     }
 
+    if ( cmd_name[1] != '/' ) {
+        char *lastc = cmd_name + strlen(cmd_name) - 1;
+        if ( *lastc == '>' )
+            *lastc = '\0' ;
+    }
+
     newdir = apr_pcalloc(p, sizeof(ap_directive_t));
     newdir->filename = parms->config_file->name;
     newdir->line_num = parms->config_file->line_number;

Mime
View raw message