William A. Rowe, Jr. wrote:
>Ian, a much bigger point is; we have a method of Logging and including
>or excluding entries based on variables. Perhaps too flexibly, and perhaps
>not considering enough variables. And rather than clutter up the list of
>variables, perhaps we focus on more expliit directives to do something
>similar to what you proposed by family, such as input header fields, output
>headers (like mime) or whatnot.
>
>Although I expressed my opinion as -1, if not a veto, you already have several
>others who think this method is duplicitous and yet too narrow to be generally
>useful. Rather than fix the directives (SetEnvIf and it's testing logic) we
>are adding a one-shot-single-use directive (much like BrowserMatch) that isn't
>flexible enough to do much, but crosses over the directives that exist.
>
It may be helpful to decouple the two issues:
* Should we have the logger itself check the content-type, or make it
check a variable set by something else?
* Assuming that we use the set-a-variable approach, should SetEnvIf be
extended to do this, or should some new directive handle it?
On the first issue, I'm in agreement with you: decoupling the metadata
check from the logger is a good thing. Setting a variable is a more
general-purpose solution that may be useful to other modules in the future.
On the second issue, I'm still -1 on extending SetEnvIf because of its
inherent performance problems. I'd be in favor of adding a newer, more
efficient function to the mod_setenvif family of directives,
though--something
like "ExtensionMatch" or "ContentTypeMatch" that did an O(1) or O(log(N))
lookup to match against N configured values.
--Brian