CGI
[HTTP Server]

Introduction

CGI commands are accepted by the Web Server via the HTTP GET command. All CGI commands follow the HTTP GET syntax of name=value. For example, to set PIC port pin A2, we can send the following HTTP command to the target board:
http://10.1.0.1/?a2=1
In this example the name part is "a2" and the value part is '1'.

The name and value strings are only allowed to use the following characters:

GET Command

A remote client invokes a function by the HTML GET method with more than one parameter. Refer to RFC1866 (the HTML 2.0 language specification) for more information. When a remote browser executes a GET method with more than one parameter, the HTTP server parses it and calls the main application with the actual method code and its parameter. In order to handle this method, the main application must implement a callback function with an appropriate code.

The Modtronix HTTP Server does not perform "URL decoding". This means that if any of the form field text contains certain special non-alphanumeric characters (such as <, >, #, %, etc.), the actual parameter value would contain "%xx" ("xx" being the two-digit hexadecimal value of the ASCII character) instead of the actual character. For example, an entry of "<Name>" would return "%3CName%3C".

The HTTPExecGetCmd() function is a callback function from the HTTP Server. When the HTTP Server receives a GET method with more than one parameter, it calls this function. This function has been implemented by the Modtronix SBC65EC Web Server in the "httpexec.c" file! All commands implemented by the Modtronix SBC65EC Web Server are listed below.

This function must repetively call the HTTPGetParam() function until all name-value parameters sent with the GET command have been obtained. It must then decode the name-value parameter and take appropriate actions. Such actions may include supplying a new Web page name to be returned and/or performing an I/O task.

Defined Commands

For a list of all commands, see Defined Commands

Generated on Wed Feb 3 12:45:36 2010 for SBC65EC Web Server by  doxygen 1.5.8