iTP Secure WebServer System Administrators Guide (Version 7.5+)
Passing Input
Input is passed to CGI programs by these ways:
• “Command Line” (page 155)
Arguments from the command line are placed into a variable argument list, and the argument
counter is appropriately incremented.
• “Query Strings” (page 155)
The CGI program receives data through the QUERY_STRING environment variable if
AUTOMATIC_FORM_DECODING is turned off. If AUTOMATIC_FORM_DECODING is turned
on, the data is stored not only in the QUERY_STRING environment variable, but in a separate
environment variable for each name/value pair.
• “Extra Path Information” (page 155)
The CGI program receives data through the PATH_INFO andPATH_TRANSLATED environment
variables.
• “HTML Forms” (page 156)
The CGI program receives data entered intoHTML forms onstandard input.
The following sections 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 toURLs:
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 appendingextra path information to URLs:
URL/cgi_script/extra_path_info
where:
extra_path_info
Passing Input 155










