httpd: ssi: move checking file extensions against g_pcSSIExtensions array into its own function guarded by LWIP_HTTPD_SSI_BY_FILE_EXTENSION

This commit is contained in:
goldsimon
2017-11-16 22:24:17 +01:00
parent 5d6b39f1ce
commit 8bd670430a
2 changed files with 55 additions and 27 deletions

View File

@@ -109,6 +109,18 @@
#define LWIP_HTTPD_SSI_RAW 0
#endif
/** Set this to 0 to prevent parsing the file extension at runtime to decide
* if a file should be scanned for SSI tags or not.
* Default is 1 (file extensions are checked using the g_pcSSIExtensions array)
* Set to 2 to override this runtime test function.
*
* This is enabled by default, but if you only use a newer version of makefsdata
* supporting the "-ssi" option, this info is already present in
*/
#if !defined LWIP_HTTPD_SSI_BY_FILE_EXTENSION || defined __DOXYGEN__
#define LWIP_HTTPD_SSI_BY_FILE_EXTENSION 1
#endif
/** Set this to 1 to support HTTP POST */
#if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__
#define LWIP_HTTPD_SUPPORT_POST 0