httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Korthof">
Subject Re: SetEnvIf/HeaderMatch (was Re: Putting the date into the referer log.)
Date Tue, 05 Nov 1996 22:45:00 GMT
On Nov 4,  9:19am, Paul Sutton wrote:
> Subject: Re: Putting the date into the referer log.
> Ok, here is a first draft of my 'mod_setenvif'. I've called the directive
> SetEnvIf rather than HeaderMatch because it is capable of much more than
> just matching on headers (and it is functionally similar to a conditional
> SetEnv module, although it uses BrowserMatch syntax for setting env-vars,
> not SetEnv). So the example becomes
>   SetEnvIf User-Agent /^Mozilla/ netscape=yes
> There is a SetEnvIfNoCase to correspond with BrowserMatchNoCase. I'd
> prefer to make case-ness an argument, but passing more than three gets
> tricky. This module already needs an extra options argument, ITERATE3
> (patch also enclosed).

Hi y'all (my first post to this list) --

I have a request for this module, which I'd be willing to help code.  Is there
some way to extract part of the UA string?  I'd like to be able to get the
version number of the browser, and possibly other information.  (This could
certainly wait till after 1.2 so long as backward compatibility is easy to
maintain.)  Unless the function does more than is shown, it'd be hard to do
this without an unappealing, brute-force method.

Storing variables via ()'s (in $1, etc.) seems one possible way, but I don't
know how much work that is, since I've never implemented such a system.  I'm
going to go over the module and see about implementing this, but I wanted to
ask about it here before I spend too much time on it.

Also, why not specify case-ness in the match (with the default case-sensative)
via a letter appended to the closing '/' -- a la Perl's match operator?
 Compact, consistent with what users would likely expect, it avoids the need
for another argument, and it'd be easy to expand if needed.

In any case --

Ed Korthof

View raw message