From 84fcd6290e7754d6cfe77e662957885321ed1ac3 Mon Sep 17 00:00:00 2001 From: Mike Kleshov Date: Mon, 22 Jan 2018 19:49:10 +0100 Subject: [PATCH] [patch #9548] Add .json to list of SSI file extensions Signed-off-by: goldsimon --- src/apps/httpd/httpd_structs.h | 2 +- src/include/lwip/apps/httpd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/httpd/httpd_structs.h b/src/apps/httpd/httpd_structs.h index 590af4b7..137f8e91 100644 --- a/src/apps/httpd/httpd_structs.h +++ b/src/apps/httpd/httpd_structs.h @@ -115,7 +115,7 @@ static const tHTTPHeader g_psHTTPHeaders[] = { #if LWIP_HTTPD_SSI static const char *const g_pcSSIExtensions[] = { - ".shtml", ".shtm", ".ssi", ".xml" + ".shtml", ".shtm", ".ssi", ".xml", ".json" }; #define NUM_SHTML_EXTENSIONS LWIP_ARRAYSIZE(g_pcSSIExtensions) #endif /* LWIP_HTTPD_SSI */ diff --git a/src/include/lwip/apps/httpd.h b/src/include/lwip/apps/httpd.h index a6686b89..1104adea 100644 --- a/src/include/lwip/apps/httpd.h +++ b/src/include/lwip/apps/httpd.h @@ -125,7 +125,7 @@ extern void httpd_cgi_handler(const char* uri, int iNumParams, char **pcParam, c * * This function will be called each time the HTTPD server detects a tag of the * form in files with extensions mentioned in the g_pcSSIExtensions - * array (currently .shtml, .shtm, .ssi, .xml) where "name" appears as + * array (currently .shtml, .shtm, .ssi, .xml, .json) where "name" appears as * one of the tags supplied to http_set_ssi_handler in the tags array. The * returned insert string, which will be appended after the the string * "" in file sent back to the client, should be written to pointer