iTP Secure WebServer System Administrator's Guide (iTPWebSvr 6.0+)
Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrator’s Guide—523346-002
8-24
Passing Input
Passing Input
Input is passed to CGI programs by the following means:
•
Command Line on page 8-24
Arguments from the command line are placed into a variable argument list, and the
argument counter is appropriately incremented.
•
Query Strings on page 8-24
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 also in a separate environment
variable for each name/value pair.
•
Extra Path Information on page 8-25
The CGI program receives data through the PATH_INFO and
PATH_TRANSLATED environment variables.
•
HTML Forms on page 8-26
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