httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject mod_include "-A /path" (Re: Expression Parser API?)
Date Thu, 29 Nov 2007 01:21:44 GMT
On Wed, 28 Nov 2007 13:19:34 +0200 (SAST)
"Graham Leggett" <> wrote:

> On Wed, November 28, 2007 1:06 pm, Nick Kew wrote:
> > Agreed.  As it happens, I started on exactly that this morning,
> > before having to turn my attention away from hacking.  With a bit
> > of luck I'll find the time to come up with something working
> > this evening or tomorrow.  I expect this to answer my own point
> > in
> > and generalise to enable us to introduce new -Options.
> I sat for ages trying to decide on a suitable syntax for this. One
> option was to use the function(parameter) syntax used by programming
> languages, or SQL, but that meant possible major surgery to a piece
> of code that has been quiet and stable for years.
> Eventually I followed the thinking that the conditional parse mostly
> follows the conditional handling of /bin/sh, and using the -x syntax
> is an extension of /bin/sh, or test. The choice of -A was based on it
> not clashing with any other tests in /bin/sh, which has no concept of
> access or URLs (it has a concept of "read" bit set, but I figured
> that a future mod_include might want to care if the "read" bit was
> set on a file (you never know), so I kept it safe).

OK, fairy nuff I understand the shell args derivation, and that's
fine by me.  I'd prefer "-A /foo/bar.txt < 400", but I'm happy
to accept your version.

What I don't like about the patch is the evaluation inline within
the parser.  I'm updating my working version to pass in an evaluation
function for shell-stuff, but there's no way that's going to make 2.2.7.
So in the meantime, I attach a patch that puts the evaluation and
subrequest stuff into a separate function, in preparation for taking
the parser from mod_include to core at a future date.  Patch attached.

If you're happy with this minor reorganisation of your proposal,
then you have my +1 on it.

Nick Kew

Application Development with Apache - the Apache Modules Book

View raw message