httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <>
Subject Re: Broken clients
Date Sun, 21 Jul 1996 18:17:09 GMT
Brian Behlendorf liltingly intones:
> strstr(agent, "Mozilla/2") && strstr(agent, "Win95")
> would appear to capture the right combination, sparing 
> MSIE, maybe?
Yepper. It's gonna be slower, though.

> 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.
> 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?  
Now this is the real solution, since we're going to be dealing with stuff
like this forever. Caching should help some, even though you'd still have
to sift through the header info each time.

Chuck Murcko	N2K Inc.	Wayne PA
And now, on a lighter note:
Honk if you love peace and quiet.

View raw message