httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: Fixing BrowserMatch: multi-string search algorithms?
Date Tue, 07 May 2002 20:08:36 GMT
On Mon, May 06, 2002 at 07:24:47PM -0500, Scott Lamb wrote:
> Scott Lamb wrote:
> > I suggest creating a new regular expression which is each of the ones in 
> > the list separated by '|'. It will use regular expression alternatives 
> > to match multiple patterns with a single state machine. And add almost 
> > no code.
> 
> Oops, I forgot to mention that I think this is possible only where you 
> are doing the same thing with each match. I.e., these three in the 
> standard config could be combined in this way:
> 
>      BrowserMatch "RealPlayer 4\.0" force-response-1.0
>      BrowserMatch "Java/1\.0" force-response-1.0
>      BrowserMatch "JDK/1\.0" force-response-1.0
> 
> but not with anything that does something other than just 
> force-response-1.0.

Well, you could use the combined regex as an initial test on whether
anything even needs to happen. Then you can iterate to determine the
specific action.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message