diff --git a/docs/overview/build-options/enabling-flags.md b/docs/overview/build-options/enabling-flags.md index f3cca7c0..300beb53 100644 --- a/docs/overview/build-options/enabling-flags.md +++ b/docs/overview/build-options/enabling-flags.md @@ -10,7 +10,8 @@ title: Enabling flags - `MG_ENABLE_COAP` enable CoAP protocol - `MG_ENABLE_HTTP` Enable HTTP protocol support (on by default, set to 0 to disable) - `MG_ENABLE_HTTP_CGI` Enable [CGI](https://docs.cesanta.com/mongoose/master/#/http/cgi.md/) support -- `MG_ENABLE_HTTP_SSI` Enable [Server SIde Includes](https://docs.cesanta.com/mongoose/master/#/http/ssi.md/) support +- `MG_ENABLE_HTTP_SSI` Enable [Server Side Includes](https://docs.cesanta.com/mongoose/master/#/http/ssi.md/) support +- `MG_ENABLE_HTTP_SSI_EXEC` Enable SSI `exec` operator - `MG_ENABLE_HTTP_WEBDAV` enable WebDAV extensions to HTTP - `MG_ENABLE_HTTP_WEBSOCKET` enable WebSocket extension to HTTP (on by default, =0 to disable) - `MG_ENABLE_GETADDRINFO` enable `getaddrinfo()` in `mg_resolve2()` diff --git a/mongoose.c b/mongoose.c index 74e9b9fe..37d2db59 100644 --- a/mongoose.c +++ b/mongoose.c @@ -45,7 +45,6 @@ #ifdef PICOTCP #define NO_LIBC -#define MG_DISABLE_POPEN #define MG_DISABLE_SOCKETPAIR #define MG_DISABLE_PFS #endif @@ -6877,7 +6876,7 @@ static void mg_do_ssi_include(struct mg_connection *nc, struct http_message *hm, } } -#if !MG_DISABLE_POPEN +#if MG_ENABLE_HTTP_SSI_EXEC static void do_ssi_exec(struct mg_connection *nc, char *tag) { char cmd[BUFSIZ]; FILE *fp; @@ -6891,7 +6890,7 @@ static void do_ssi_exec(struct mg_connection *nc, char *tag) { pclose(fp); } } -#endif /* !MG_DISABLE_POPEN */ +#endif /* MG_ENABLE_HTTP_SSI_EXEC */ /* * SSI directive has the following format: @@ -6903,7 +6902,7 @@ static void mg_send_ssi_file(struct mg_connection *nc, struct http_message *hm, static const struct mg_str btag = MG_MK_STR("