Commit 5f59b7e7 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by rojer

Enable SSI on CC3200 (w/o exec)

Disable CGI automatically, as it's never going to work.

PUBLISHED_FROM=37d7abc54be4637dfec5031bc3398e97a1be3090
parent 024b2493
......@@ -28,8 +28,6 @@ MONGOOSE_FEATURES = \
-DMG_DISABLE_JSON_RPC \
-DMG_DISABLE_COAP \
-DMG_DISABLE_DAV \
-DMG_DISABLE_CGI \
-DMG_DISABLE_SSI \
-DMG_ENABLE_HTTP_STREAMING_MULTIPART \
-DMG_MAX_HTTP_HEADERS=20 \
-DMG_MAX_HTTP_REQUEST_SIZE=1024 \
......
......@@ -5710,14 +5710,14 @@ static void mg_send_ssi_file(struct mg_connection *nc, const char *path,
static const struct mg_str d_exec = MG_MK_STR("exec");
#endif
char buf[BUFSIZ], *p = buf + btag.len; /* p points to SSI directive */
int ch, offset, len, in_ssi_tag;
int ch, len, in_ssi_tag;
if (include_level > 10) {
mg_printf(nc, "SSI #include level is too deep (%s)", path);
return;
}
in_ssi_tag = len = offset = 0;
in_ssi_tag = len = 0;
while ((ch = fgetc(fp)) != EOF) {
if (in_ssi_tag && ch == '>' && buf[len - 1] == '-' && buf[len - 2] == '-') {
size_t i = len - 2;
......@@ -7838,8 +7838,10 @@ void *mg_start_thread(void *(*f)(void *), void *p) {
void mg_set_close_on_exec(sock_t sock) {
#ifdef _WIN32
(void) SetHandleInformation((HANDLE) sock, HANDLE_FLAG_INHERIT, 0);
#else
#elif defined(__unix__)
fcntl(sock, F_SETFD, FD_CLOEXEC);
#else
(void) sock;
#endif
}
......
......@@ -397,6 +397,8 @@ unsigned long os_random(void);
#define MG_SOCKET_SIMPLELINK 1
#define MG_DISABLE_SOCKETPAIR 1
#define MG_DISABLE_SYNC_RESOLVER 1
#define MG_DISABLE_POPEN 1
#define MG_DISABLE_CGI 1
#include <simplelink.h>
......@@ -543,6 +545,8 @@ typedef struct stat cs_stat_t;
#define closesocket(x) sl_Close(x)
#define fileno(x) -1
/* Some functions we implement for Mongoose. */
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment