httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: Redesigning <Limit > from the ground up.
Date Tue, 13 Feb 2007 22:53:07 GMT
On Tue, 13 Feb 2007 15:46:38 -0600
"William A. Rowe, Jr." <> wrote:

> > I disagree.  <Limit> is far too firmly established to change its
> > semantics.  Either we keep it as-is (warts and all) or we scrap it, 
> > and generate a startup error that advises the user of alternatives.
> Well, I'm proposing this for now to 2.4.

Well, it couldn't be anything earlier than that!

> > One possible replacement would be to make it an optional argument
> > to <Directory> & family:
> > 
> > <Location /limited/ methods="GET POST HEAD">
> > </Location>
> > 
> > I haven't thought through the implementation details of that,
> > but the semantics work, and I think they'd deal with your concerns.
> Now that's an interesting idea.  I'll consider that.
> Within the construct of the original suggestion, what if <Limit > in
> my proposed form became <Method[s] >?  Would that help to disambiguate
> the two?

Yes, but it still feels confusing.  Going back to your first post,
I think that's why the 'right' semantics aren't obvious.

Come to think of it, there's a lot of confusion about
<Directory> vs <Location> in luser-land.  We have it
documented, but only those with braincells read that.
Perhaps this could benefit from a ganeral overhaul

<Directory /dir/>  -->  <Section filepath = /dir/>
<Location /loc/>   -->  <Section urlpath = /loc/>
<Files pattern>    -->  <Section relpath = pattern>
<FilesMatch regex> -->  <Section relpath ~ regex>
<Limit GET POST>   -->  <Section methods = "GET POST">
... etc ...

Generalising to <Section somepath=... methods=...>,
and to support things like negation.

Possibly also drop the confusingly markup-like syntax:

BEGIN filepath=/dir/

Design goals:
  - An old config can be programatically updated
    (and we ship a perl script to do it).
  - No source-incompatibility with 2.0/2.2 modules
  - API for modules to add their own arguments

Nick Kew

Application Development with Apache - the Apache Modules Book

View raw message