mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-12 19:26:52 +08:00
httpd: add "struct file*" parameter to httpd_cgi_handler() callback
This commit is contained in:
@@ -102,13 +102,17 @@ void http_set_cgi_handlers(const tCGI *pCGIs, int iNumHandlers);
|
||||
#if LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI
|
||||
|
||||
#if LWIP_HTTPD_CGI_SSI
|
||||
/* we have to prototype this struct here to make it available for the handler */
|
||||
struct fs_file;
|
||||
|
||||
/** Define this generic CGI handler in your application.
|
||||
* It is called once for every URI with parameters.
|
||||
* The parameters can be stored to the object passed as connection_state, which
|
||||
* is allocated to file->state via fs_state_init() from fs_open() or fs_open_custom().
|
||||
* Content creation via SSI or complete dynamic files can retrieve the CGI params from there.
|
||||
*/
|
||||
extern void httpd_cgi_handler(const char* uri, int iNumParams, char **pcParam, char **pcValue
|
||||
extern void httpd_cgi_handler(struct fs_file *file, const char* uri, int iNumParams,
|
||||
char **pcParam, char **pcValue
|
||||
#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE
|
||||
, void *connection_state
|
||||
#endif /* LWIP_HTTPD_FILE_STATE */
|
||||
|
||||
Reference in New Issue
Block a user