The match-browser function matches specific strings in the User-Agent string supplied by the browser. It then modifies the behavior of Web Server based on the results by setting values for specified variables. This function is applicable in all directives.
stage fn="match-browser" browser="string" name="value" [name="value" ...]
The following table describes parameter values for the match-browser function.
Table 7–111 match-browser Parameters
Value |
Description |
---|---|
stage |
Stage directive used in obj.conf processing. The match-browser function is applicable in all stage directives. |
string |
Wildcard pattern to compare with the User-Agent header (for example, "*Mozilla*"). |
name |
Variable to be changed. The match-browser function indirectly invokes the set-variable function. |
value |
New value for the specified variable. |
AuthTrans fn="match-browser" browser="*[Bb]roken*" ssl-unclean-shutdown="true" keep-alive="disabled" http-downgrade="1.0"
If a browser's User-Agent header contains the string Broken or broken, the above AuthTrans directive instructs the server to do the following:
Not send the SSL3 and TLS close_notify packet
Not honor requests for HTTP Keep-Alive
Use the HTTP/1.0 protocol rather than HTTP/1.1
For more information on the variables used in this example, such as ssl-unclean-shutdown, see set-variable.