Embedded TCP/IP stack: fnet_http_cgi_handle_t

FNET

typedef fnet_return_t(* fnet_http_cgi_handle_t) (fnet_http_session_t session, fnet_char_t *query, fnet_uint32_t *cookie)

Callback function prototype of the CGI query handler.

Parameters
sessionHTTP session handle.
queryCGI query string (null-terminated).
The query string is set to whatever appears after the question mark in the URL itself.
cookieThis parameter points to the value, initially set to zero, which can be used to associate a custom information with a connection instance. If application store context information in the cookie, it will be preserved for future calls for this request. This allows the application to associate some request-specific state.
Returns
This function must return:
See also
fnet_http_cgi, fnet_http_cgi_send_t

The CGI handler invokes this callback function when the server gets CGI request and the requested CGI file name corresponds to the name registered in the CGI table.
The query points to the CGI query string. If the CGI request does not have any data, the query will point to the blank string.
If the HTTP server works according to HTTP/1.x (FNET_CFG_HTTP_VERSION_MAJOR is 1), this function may use fnet_http_set_response_status_code() to change the default HTTP response status-code.

Definition at line 72 of file fnet_http_cgi.h.


© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net