@CHIP-RTOS C Library - Common Gateway Interface API

Header File:         #include <CGIAPI.H>

The CGI ("Common Gateway Interface") API provides access to the CGI implementation of the IPC@CHIP® Web server.
CGI at the IPC@CHIP® provides the possibility to install at the IPC@CHIP® Web server own programmed CGI functions. These functions are bound with a fixed name and are executed by the Web server task, if a http request with such a fixed name comes in. This mechanism allows dynamic usage of the IPC@CHIP® Web server. For better understanding of CGI and possibilities for using, see description of available program examples at the example link below.

File Upload:
Also there is a possibility to upload files to the @CHIP's disk.   This does not use the CGI interface but the Web server.   Therefore you only need a defined HTML form which sends the required data to the @CHIP Web server.   An example can be found in the CGI Example Zip file.

  1. For test and demonstration purpose two pages are preinstalled at the IPC@CHIP®:
    a)main.htm: Static html introduction page.
    b)chipcfg: Dynamic page with system time/date and configuration data of the requested IPC@CHIP®.
  2. For configuring the web server and CGI, see the provided chip.ini entries.
  3. For some useful comments see also under Programming notes


CGI Functions

CGI_InstallInstall a CGI function
CGI_DeleteRemove a CGI function
CGI_SetMainPageSelect a new main page
CGI_GetMainPageGet main page name
CGI_SetMainPagePostSelect a new main page (POST method)
CGI_GetMainPagePostGet main page name (POST method)
CGI_SetRootDriveSet Web server's root drive
CGI_GetRootDriveGet Web server's root drive
CGI_SetRootDirSet Web server's root directory
CGI_GetRootDirGet Web server's root directory
CGI_SetCredentialsSet Web server's user names and passwords
CGI_GetArgumentReturns the next available argument
CGI_UrlEncodeEncodes a URL string
CGI_UrlDecodeDecodes a URL string
CGI_GetCookieReturns the next available cookie
CGI_SetCookieCreates a new cookie or modifies an old one
CGI_GetFormItemDeprecated! Split a form item into name and value
CGI_GetNextItemDeprecated! Return pointer to the next form item
CGI_Install_Func_OnErrInstall error cgi function
CGI_Install_Func_OnUploadInstall upload cgi function
CGI_Enable_UploadEnable/Disable HTTP file upload
CGI_Install_MIME_TableInstall a custom MIME table
CGI_Remove_MIME_TableRemove the custom MIME table
CGI_Install_ContentEncoding_TableInstall the custom content-encoding table
CGI_Remove_ContentEncoding_TableRemove the custom content-encoding table
CGI_Install_Headers_TableInstall the custom headers table
CGI_Remove_Headers_TableRemove the custom headers table

SSI Functions

SSI_Set_File_FilterSet a SSI file filter
SSI_Register_TagRegister a SSI tag
SSI_Deregister_TagDeregister a SSI tag
SSI_Set_TagLengthSet the maximum SSI tag length
SSI_Send_BufferSend a buffer over a HTTP connection
SSI_Get_Connection_ParamsGet SSI connection parameters

List of C Libraries
@CHIP-RTOS Main Index

End of document