CGI Command line options
The command line is only used in the case of an ISINDEX query. It is
not used in the case of an HTML form or any as yet undefined query
type. The server should search the query information for a non-encoded
= character to determine if the command line is to be used, if it
finds one, the command line is not to be used. This trusts the clients
to encode the = sign in ISINDEX queries, a practice which was
considered safe at the time of the design of this specification.
If the server finds one, it will decode the query information by first
splitting it on the pluses given in the URL. It
will then perform the additional decoding before placing the resulting
words on argv[1....].
If the server finds that it cannot send the string due to internal
limitations (such as exec() or /bin/sh command line restrictions) the
server should include NO command line information and provide the
non-decoded query information in the environment
Examples of the command line usage are much better demonstrated than explained. For these
examples, pay close attention to the script output which says what
argc and argv are.
Return to the