iTP Secure WebServer System Administrators Guide (Version 7.5+)

Table 18 Environment Variable Access Methods (continued)
Variable Access MethodLanguage
$env(cgi_dump.cgi)
This access method accesses environment variables as
normal shell variables
Format:
Bourne Shell
variable=$environment_variable_name
Example:
SNAME=$SERVER_NAME
This access method accesses environment variables as
normal shell variables
Format:
Korn Shell
variable=$environment_variable_name
Example:
SNAME=$SERVER_NAME
You access environment variables through the
HttpServletRequest class
Java
HTTP Header Variables
In addition to the predefined environment variables, the iTP Secure WebServer creates environment
variables for HTTP header lines sent by a Web client. The server names these variables by prefixing
HTTP_ to the name of the header converted to uppercase. Any dash (-) characters in the header
name are converted to underscore (_) characters.
For example, for the Web client header
User-agent: WebBrowser/2.1
the server creates the environment variable HTTP_USER_AGENT and assigns to it the value
WebBrowser/2.1
If more than one client header has the same name, the server creates a single environment variable
based on the common name (CN). For example, the variable for multiple Accept: headers would
be HTTP_ACCEPT. The single value assigned to this variable would consist of the Web client
headers separated by commas. For example, if the multiple client headers are:
Accept: image/gif
Accept: image/jpeg
the server would assign the value:
image/gif, image/jpeg
to environment variable HTTP_ACCEPT.
The server might omit environment variables for headers it has already processed, such as
Authorization: Content-length:, and Content-type:.
Table 19 (page 153) lists some commonly used HTTP header environment variables.
Table 19 Sample HTTP Header Variables
DescriptionSample HTTP Variable
This variable lists the MIME headers that the Web client
can accept.
HTTP_ACCEPT
Format:
[ type/subtype, ] [ type/subtype, ]
Example:
HTTP Header Variables 153