httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] improving line number reporting for config file syntax errors
Date Mon, 29 May 2000 22:03:16 GMT
On Mon, 29 May 2000 rbb@covalent.net wrote:
>...
> Having looked at Jeff's patch again, what we really need to do, is to
> combine the two patches.  Use an ap_directive_t to pass back the bad
> directive, and re-write the line number in that ap_directive if we are
> inside a container when we hit the error.

Rewrite it? Why did it have the wrong number in the first place!?!!

>...
> BTW, Does a line number actually make sense if we aren't using a
> configfile?  Perhaps the configfile_t needs to be replaced with an iol

This is why we want to move away from a configfile_t whenever possible.

I don't know if an IOL is a perfect match (it is missing a line-based
read), but yah: the basic concept is what we're looking for. I think what
we really want is something like:

struct ap_config_source_s ap_config_source_t;

ap_status_t ap_get_directive(ap_config_source_t *, ap_directive_t **);

Whatever. Basically: a way that we can ask for a directive at a time, from
whatever the source happens to be. The only thing that we build in is the
file-based config-per-line thingamajiggy.

There is more fallout/changes from this type of mechanism, but I'm not
sure what they are. Just dropping out that quick thought for now.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


Mime
View raw message