httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: [PATCH] improving line number reporting for config file syntax errors
Date Mon, 29 May 2000 19:59:30 GMT
> From: rbb@covalent.net
> Mailing-List: contact new-httpd-help@apache.org; run by ezmlm
> Precedence: bulk
> X-No-Archive: yes
> Reply-To: new-httpd@apache.org
> list-help: <mailto:new-httpd-help@apache.org>
> list-unsubscribe: <mailto:new-httpd-unsubscribe@apache.org>
> list-post: <mailto:new-httpd@apache.org>
> X-Authentication-Warning: koj.rkbloom.net: rbb owned process doing -bs
> Date: Mon, 29 May 2000 11:19:40 -0700 (PDT)
> X-Sender: rbb@koj.rkbloom.net
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> X-UIDL: 27d3ef542e1b9714abb26d7decebbf73
> 
> 
> 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.

Ryan: I don't have a chance to apply/try it now, but I don't think
your patch will improve the line number situation for stuff like

PidFile 1 2 3 4 5 6 7

Also, I think it only catches incorrect keywords, and would only have
the right line number for such errors with global scope (i.e., not in
a container).

I gotta run some errands now, but I'll verify this when I get back.

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

Hey, I'm not that happy with my patch :)  I think it is an incomplete
fix.  I would want to pursue a new argument list flavor to use with
dirsection(), urlsection(), et al so that we always have the right
line number. 

> 
> 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
> -------------------------------------------------------------------------------
> 
> 


-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message