httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Broken clients
Date Sun, 21 Jul 1996 17:40:32 GMT
Brian Behlendorf wrote:
> 
> 
> strstr(agent, "Mozilla/2") && strstr(agent, "Win95")

I thought the Win3.1 versions were broken, too?

> 
> would appear to capture the right combination, sparing 
> MSIE, maybe?
> 
> A more general solution: Alexei has hacked up for Organic a module which
> sets environment variables (for use by CGI scripts, PHP, SSI's, whatever)
> based on a regex match against the User-Agent header, i.e.
> 
>   BrowserMatch /Mozilla\/2/ plugins javascript
> 
> or whatever.  Right now it's like a switch statement - the first match is
> the only one which can set env vars, so that if we need to have 30
> different Browser lines we're not going through each regex test with each
> web hit.  However, we could also probably throw in a different directive
> which was processed on each hit, i.e.
> 
>   BrowserMatchAny /Mozilla\/2.*Win95/ brokenkeepalivetimeout
>   BrowserMatchAny /Mozilla\/2/ brokenkeepaliveflushing
>   
> or whatever.  At this point, the keepalive code, when it makes its
> decision whether to use keepalives, when to flush headers, etc., tests for
> those environment variables.  The glory is that as the environment
> changes, as the client marketshare changes and as new browsers come out
> with similar bugs, we don't have to change the code.  People can tweak
> this to whatever combination of speed vs. functionality they desire.

I'd be surprised if there was any significant time taken in the pattern
matching.

I like the concept, anyway, as I think I said last time it was suggested. It
does leave us with the question of a pattern matching package, again. That is,
assuming we can't just use the OS native ones (can we?).

> 
> Obviously the speed of such a system is a critical concern, seeing as how
> this needs to happen right after the request is finished being received
> and before any response is sent.  Maybe previous pattern match results can
> be cached in shared memory in a hash table of some sort?  

I hesitate to mention C++ again but can I just throw in how much easier this
kind of thing is to implement and use in C++? [Yes, I have installed the
asbestos monitor shield].

Cheers,

Ben.

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)

Mime
View raw message