httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: [PATCH] improving line number reporting for config file syntax errors
Date Mon, 29 May 2000 18:19:40 GMT

This is a real problem, and although I really dislike the patch I am
submitting, it does fix the problem AFAICT.  There are some issues with it
I am sure, but at least we report the correct information.

If people hate this patch, then I am +1 for Jeff's.

Ryan

Index: STATUS
===================================================================
RCS file: /home/cvs/apache-2.0/STATUS,v
retrieving revision 1.72
diff -u -d -b -w -u -r1.72 STATUS
--- STATUS	2000/05/29 11:54:11	1.72
+++ STATUS	2000/05/29 18:16:35
@@ -55,9 +55,6 @@
         Status: The best known candidate would be something from
 	BIND v9.
 
-    * The wrong line number is reported for configuration file syntax 
-      errors.  If this isn't fixed, the bug database will explode.
-
 RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
     * OS/2: Get loadable modules working again. Requires shared core support
       which doesn't appear to be catered for in the current build system.
Index: src/CHANGES
===================================================================
RCS file: /home/cvs/apache-2.0/src/CHANGES,v
retrieving revision 1.125
diff -u -d -b -w -u -r1.125 CHANGES
--- src/CHANGES	2000/05/29 08:57:19	1.125
+++ src/CHANGES	2000/05/29 18:16:41
@@ -1,5 +1,9 @@
 Changes with Apache 2.0a4
 
+  *) We now report the correct line number for Syntax errors from config
+     files.
+     [Ryan Bloom]
+
   *) Brought mod_auth_digest up to synch with 1.3, fixed ap_time_t-
      related bugs, and changed shmem/locking to use apr API. Shared-mem
      is currently disabled, however, because of problems with graceful
Index: src/main/http_config.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/http_config.c,v
retrieving revision 1.54
diff -u -d -b -w -u -r1.54 http_config.c
--- src/main/http_config.c	2000/05/28 03:52:41	1.54
+++ src/main/http_config.c	2000/05/29 18:16:47
@@ -984,6 +984,7 @@
 	const command_rec *cmd;
 
 	if (!(cmd = ap_find_command_in_modules(current->directive, &mod))) {
+	    parms->config_file->line_number = current->line_num;
             return ap_pstrcat(parms->pool, "Invalid command '", 
 			      current->directive,
 			      "', perhaps mis-spelled or defined by a module "


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message