CGI Control

Commands are executed by constructing and requesting a specific URI with a dirname of /cgi-bin/ and a basename corresponding to the command you wish to execute.

The method of the URL must be HTTP GET on port 80.

The dirname of the URL must be /cgi-bin/.

The basename of the URL is the command that you wish to execute.

Arguments are specified as they would be in an HTML form submission. The command is separated from its arguments with a question mark (?), and arguments are separated with an ampersand. Each argument is of the form property=value. Normal URL escaping and formatting rules apply. The exception is that the first argument may be unnamed.

Examples:

Properties

Properties may be set using the "set" command, and returned via "get".

Response Format

If the command is successful then templates/success.tmpl is processed and returns a "Success" message.

If there is an error, templates/error.tmpl is processed and returns the command name and error number.

Commands that return binary results, such as /cgi-bin/image.jpg, do not use the response template mechanism.

No Process Header

You may also prefix the command name with "nph-". Commands sent this may not result in a 100% correct HTTP handshake, but have a significantly higher bandwidth. It's recommended that this be used for all image and video transfers.