iTP Secure WebServer System Administrator's Guide (iTPWebSvr 5.1+)

Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrators Guide522659-001
8-23
Command Line
Extra Path Information (See page 8-24)
The CGI program receives data through the PATH_INFO and
PATH_TRANSLATED environment variables.
HTML Forms (See page 8-24)
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 the
following URL:
http://www.cis.ohio-state.edu/htbin/rfc/rfc1738.html
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, as follows:
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.