httpd: fixed using pools, fixed missing default value of LWIP_HTTPD_SSI_RAW, fixed typo

This commit is contained in:
goldsimon 2016-07-08 10:05:23 +02:00
parent c483520081
commit e302b1bbd2
3 changed files with 7 additions and 3 deletions

View File

@ -2619,13 +2619,11 @@ httpd_init(void)
struct tcp_pcb *pcb;
err_t err;
#if MEMP_MEM_MALLOC || MEM_USE_POOLS || MEMP_USE_CUSTOM_POOLS
#if HTTPD_USE_MEM_POOL
LWIP_MEMPOOL_INIT(HTTPD_STATE);
#if LWIP_HTTPD_SSI
LWIP_MEMPOOL_INIT(HTTPD_SSI_STATE);
#endif
#endif
#endif
LWIP_DEBUGF(HTTPD_DEBUG, ("httpd_init\n"));

View File

@ -165,7 +165,7 @@ typedef u16_t (*tSSIHandler)(
void http_set_ssi_handler(tSSIHandler pfnSSIHandler,
const char **ppcTags, int iNumTags);
/** For LWIP_HTTPD_SSI_RAW==1, return this to indicat the tag is unknown.
/** For LWIP_HTTPD_SSI_RAW==1, return this to indicate the tag is unknown.
* In this case, the webserver writes a warning into the page.
* You can also just return 0 to write nothing for unknown tags.
*/

View File

@ -58,6 +58,12 @@
#define LWIP_HTTPD_SSI 0
#endif
/** Set this to 1 to implement an SSI tag handler callback that gets a const char*
* to the tag (instead of an index into a pre-registered array of known tags) */
#ifndef LWIP_HTTPD_SSI_RAW
#define LWIP_HTTPD_SSI_RAW 0
#endif
/** Set this to 1 to support HTTP POST */
#ifndef LWIP_HTTPD_SUPPORT_POST
#define LWIP_HTTPD_SUPPORT_POST 0