httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@cpan.org>
Subject [Patch] ap_soak_end_container and argument-less <Block> directives
Date Wed, 11 Feb 2004 23:00:08 GMT
As can be seen with this simple config file:

<IfDefine not-defined>
<Location>
</Location>
</IfDefine>

$> httpd -f broken.conf
Syntax error on line 1 of broken.conf:
Expected </Location>> but saw </Location>

It's only a problem with <Blocks> without argument, i.e. <Perl> blocks
in mod_perl land.

It's a bug similar to this other one I found with directive-less <Block>
directive (http://marc.theaimsgroup.com/?t=106565148000001&r=1&w=2)

Index: server/config.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/config.c,v
retrieving revision 1.156.2.13
diff -u -I$Id -r1.156.2.13 config.c
--- server/config.c	9 Feb 2004 20:59:45 -0000	1.156.2.13
+++ server/config.c	11 Feb 2004 22:55:21 -0000
@@ -1287,6 +1287,10 @@
             else {
                 const char *msg;
 
+                if (*args == '\0' && cmd_name[strlen(cmd_name) - 1] == '>') {
+                    cmd_name[strlen(cmd_name) - 1] = '\0';
+                }
+
                 if ((msg = ap_soak_end_container(cmd, cmd_name)) != NULL) {
                     return msg;
                 }


Mime
View raw message