www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barrie Slaymaker <barr...@slaysys.com>
Subject config/7617: '>' is left on directives with no args (eg "<Foo>")
Date Tue, 24 Apr 2001 20:14:21 GMT

>Number:         7617
>Category:       config
>Synopsis:       '>' is left on directives with no args (eg "<Foo>")
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Apr 24 13:20:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     barries@slaysys.com
>Release:        2.0.18-dev
>Organization:
apache
>Environment:
N/A
>Description:
Putting

   <Foo>
   </Foo>

in a config file yeilds:

   Syntax error on line 946 of /home/barries/2.0/www/conf/httpd.conf:
   Expected </Foo>> but saw </Foo>
>How-To-Repeat:
See above.
>Fix:
This patch changes the error report to:

   Syntax error on line 944 of /home/barries/2.0/www/conf/httpd.conf:
   Invalid command '<Foo', perhaps mis-spelled or defined by a module not included in the
server configuration

--- server/config.c.orig        Tue Apr 24 15:20:20 2001
+++ server/config.c     Tue Apr 24 15:19:41 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;
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message