httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <>
Subject mod_browser
Date Wed, 07 Aug 1996 23:06:19 GMT
I've uploaded to /httpd/incoming/mod_browser.c, with documentation in
mod_browser.html, a module that implements functionality that we've
discussed here before, and that has generally been agreed to be a useful
addition to the Apache distribution.

This module sets environment variables based on the User-Agent string.
These are then available to CGI scripts, or includes, or what have you.
This is done using regular expressions, e.g.

BrowserMatch ^Mozilla/[2-3] tables javascript

would set the variables "tables" and "javascript". It sets them to "1"
unless otherwise specified (e.g. "variable=value").

This lets you do several things. For one, it lets you modify Apache's
behavior based on the User-Agent. For example, we could throw in an
"!table_get(r->subprocess_env, "nokeepalive")" into the keepalive code,
andthen do "BrowserMatch ^Mozilla/2.*Win nokeepalive" (or whatever). This
is something we discussed earlier.

The other important thing, and perhaps the most obvious, is that it gives
Apache, when combined with xssi, an out-of-the-box solution to
feature-based conditional HTML. Which is something people seem to want.


-- Alexei Kosut <>            The Apache HTTP Server

View raw message