iTP Secure WebServer System Administrators Guide (Version 7.5+)

is information to be passed to the designated CGI program (cgi_script). The
most common use of extra path information is to specify the relative path name of
a data file.
The iTP Secure WebServer stores the contents of extra_path_info in the PATH_INFO variable.
Using the mapping information specified in theFilemap directive, the iTP Secure WebServer also
translates the PATH_INFO path name and assigns the translated path name to the variable
PATH_TRANSLATED. The PATH_INFO and PATH_TRANSLATED environment variables are both
available to the CGI program (cgi_script).
For example, if the request URL is:
http://www.company.com/search.cgi/misc/images
and the server Filemap directive is:
Filemap / /usr/tandem/webserver/root
the path name /misc/images is assigned to the PATH_INFO variable. Using the mapping in
the Filemap directive, the server expands the contents of PATH_INFO to
/usr/tandem/webserver/root/misc/images
and assigns this expanded path name to the variable PATH_TRANSLATED.
HTML Forms
Input data can be passed to CGI programs through input parameters constructed from data items
entered into HTML forms. These parameters are read by CGI programs onstandard input.
Each data item entered into an HTML form is assigned to a value-name. The resulting names and
their values then are used to construct input parameters formatted as:
name=value&name=value...&name=value
where:
A space in a value is replaced with a plus sign (+).
An equals sign (=) assigns a value to a specific name.
An ampersand (&) separates individual parameters.
For example, if a user name (John J. Smith) and an e-mail address (jsmith@xyz.com) are
entered into an HTML form as input, these data items would be formatted into input parameters as
follows:
NAME=John+J.+Smith&EMAIL=jsmith@xyz.com
The input parameters must be entered exactly as required.
The environment variable CONTENT_LENGTH specifies the number of bytes on standard input.
For detailed information about processing forms input parameters, consult an appropriate HTML
resource.
Returning Output
Any output a CGI program writes tostandard output is passed by the server to the Web client. This
output has three components:
One or moreHTTP response headers
These headers contain descriptive information about the server response to a request, such
as the content (data) type, the number of bytes, and the expiration time.
A blank line
This blank line is mandatory, even no content follows it. This requirement is imposed by RFC
822; to see RFC 822, use the following URL:
156 Using Common Gateway Interface (CGI) Programs