httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <>
Subject Re: Rename SetEnvIf* to RequestMatch* ?
Date Fri, 22 Aug 1997 11:31:09 GMT
On Fri, 22 Aug 1997, Rodent of Unusual Size wrote:
> >From the fingers of Paul Sutton flowed the following:
> >I am against this naming scheme. The semantics of SetEnvIf are to set and
> >environment variable *if* some condition is true.
>     No, it does a thing if a regular expression is matched.  Not
>     quite the same thing.  It happens that the thing it does is
>     setting/unsetting an envariable.

Yes, exactly, this is my point. With the new name there is no indication
of what it does. "does a thing" is about the best you can get out of the
name RequestMatch. Sure Match may indicate to end users that it works on
regexps - but remember the only reason why Match was added in the first
place to Alias etc was because it *was not possible* within the legacy
syntax to add regexp matching without adding a new directive. Not because
it was a necessarily "good idea" to add "Match" to indicate regexp
matching. I would certainly have much prefered to not see the addition of
Match to these directives, nor to <Directory>, <Files> and <Location>. 

The directive name should, in my opinion, have some relation to its

> >                                               So it seems that
> >SetEnvIf is a completely logical, correct and explanatory name.
>     And completely out of line with the other directives that do things
>     if an RE is matched (BrowserMatch, FilesMatch, LocationMatch,
>     DirectoryMatch, AliasMatch, ScriptAliasMatch, and RedirectMatch).

Yeah, while that "Match" stuff was a late addition, and even so these
directives still maintain a description of their purpose. For example,
Alias{Match} creates an alias. Redirect{Match} creates a redirect. So what
does RequestMatch do? Create a request? No. Also Directory{Match} does
something to a directory (here the "something" is valid since it is
determined by the contents of the section, not the directive syntax

>     Are you exercising a veto, or just registering disapproval?

Not a vetoed, but a note that the decision should be based on the outcome
of majority voting rather than a "lazy vote". 

If the text Match is required in the name, how about SetEnvMatch? That
rather neatly fits in with Alias/AliasMatch etc in that the functionality
of the SetEnv/SetEnvMatch directives are the same, except that the later
uses a regex. 


View raw message