IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page

◆ CGI_Install_Func_OnErr()

int CGI_Install_Func_OnErr ( unsigned int  error_state,
void *  CgiFuncOnErr 

This function installs a CGI function on HTTP errors. The CGI function must be implemented in the same way than a CGI function, installed with CGI_Install(). For deleting an entry, install a null pointer.

error_stateHTTP error state:
07: 401 Unauthorized
08: 404 not found
10: 500 Server error (File system error)
22: 503 Service not available (Out of memory)
CgiFuncOnErrPointer to CGI handler function
Do not install a CGI function for HTTP state 401 (authentication required), which does a redirect to another file. This blocks the input of the username and password by a browser.
At the RTOS-LNX, CGI functions on HTTP errors can be installed by only one process. With other words, it is not allowed that one process installs a CGI function for error 401 and another process installs a CGI function for error 404. All error callbacks need to be located in one process.
zero on success, -1 on failure.
See also

Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Fri Jun 8 2018 12:48:20 by Doxygen 1.8.13