Sun Java System Web Server 7.0 Update 4 NSAPI Developer's Guide

util_is_mozilla() Function

The util_is_mozilla function checks whether a specified user-agent header string is a Mozilla browser of at least a specified revision level. The function returns a 1 if the level matches, and 0 otherwise. This function uses strings to specify the revision level to avoid ambiguities such as 1.56 > 1.5.


int util_is_mozilla(char *ua, char *major, char *minor);

Return Values

1 if the user-agent is a Mozilla browser, or 0 if the user-agent is not a Mozilla browser.


char *ua is the user-agent string from the request headers.

char *major is the major release number, found to the left of the decimal point.

char *minor is the minor release number, found to the right of the decimal point.

See Also

util_is_url() Function, util_later_than() Function