iTP Secure WebServer System Administrator's Guide (Version 7.0)

Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrator’s Guide523346-012
8-24
Command Line
The CGI program receives data through the PATH_INFO and
PATH_TRANSLATED environment variables.
HTML Forms on page 8-25
The CGI program receives data entered into HTML forms on standard input.
The following paragraphs describe these means of passing input to a CGI program.
For a detailed description of URL encoding, see RFC 1738. To see RFC 1738, use this
URL:
http://www.ietf.org/rfc/rfc1738.txt
Command Line
The command-line interface is identical to the command-line interface from a shell
program such as the Korn shell. It applies only when you run a CGI program directly
from the OSS environment to debug it and has no relevance to the iTP Secure
WebServer execution environment.
Query Strings
Input can be passed to CGI programs by appending query strings to URLs:
URL?query_string
where:
query_string
is a string of alphanumeric characters.
Any blank spaces in the query string are replaced with plus signs (+); multiple query
strings are separated with ampersands (&). The server assigns the contents of
query_string to the QUERY_STRING environment variable, which then is passed
to the CGI program designated in the URL.
For example:
http://www.datamart.com/search.cgi?Albert+Einstein&Marie_Curie
In this example, the value Albert+Einstein&Marie_Curie is assigned to the
QUERY_STRING variable, which then is passed to the CGI program search.cgi.
Extra Path Information
Input data can be passed to CGI programs by appending extra path information to
URLs:
URL/cgi_script/extra_path_info
where: