Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
1dae0373
Commit
1dae0373
authored
Oct 16, 2016
by
Deomid Ryabkov
Committed by
Cesanta Bot
Oct 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MG_DISABLE_POPEN -> MG_ENABLE_HTTP_SSI_EXEC
PUBLISHED_FROM=55b2b70a688234f6ebcfba37eced20ee5d5387a1
parent
e928f364
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
+10
-14
enabling-flags.md
docs/overview/build-options/enabling-flags.md
+2
-1
mongoose.c
mongoose.c
+4
-5
mongoose.h
mongoose.h
+4
-8
No files found.
docs/overview/build-options/enabling-flags.md
View file @
1dae0373
...
...
@@ -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()`
...
...
mongoose.c
View file @
1dae0373
...
...
@@ -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
(
"<!--#"
);
static
const
struct
mg_str
d_include
=
MG_MK_STR
(
"include"
);
static
const
struct
mg_str
d_call
=
MG_MK_STR
(
"call"
);
#if
!MG_DISABLE_POPEN
#if
MG_ENABLE_HTTP_SSI_EXEC
static
const
struct
mg_str
d_exec
=
MG_MK_STR
(
"exec"
);
#endif
char
buf
[
BUFSIZ
],
*
p
=
buf
+
btag
.
len
;
/* p points to SSI directive */
...
...
@@ -6939,7 +6938,7 @@ static void mg_send_ssi_file(struct mg_connection *nc, struct http_message *hm,
mg_call
(
nc
,
NULL
,
MG_EV_SSI_CALL
,
(
void
*
)
cctx
.
arg
.
p
);
/* NUL added above */
mg_call
(
nc
,
NULL
,
MG_EV_SSI_CALL_CTX
,
&
cctx
);
#if
!MG_DISABLE_POPEN
#if
MG_ENABLE_HTTP_SSI_EXEC
}
else
if
(
memcmp
(
p
,
d_exec
.
p
,
d_exec
.
len
)
==
0
)
{
do_ssi_exec
(
nc
,
p
+
d_exec
.
len
+
1
);
#endif
...
...
mongoose.h
View file @
1dae0373
...
...
@@ -464,7 +464,6 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
#define MG_SOCKET_SIMPLELINK 1
#define MG_DISABLE_SOCKETPAIR 1
#define MG_DISABLE_SYNC_RESOLVER 1
#define MG_DISABLE_POPEN 1
/*
* CC3100 SDK and STM32 SDK include headers w/out path, just like
...
...
@@ -520,7 +519,6 @@ int inet_pton(int af, const char *src, void *dst);
#define MG_SOCKET_SIMPLELINK 1
#define MG_DISABLE_SOCKETPAIR 1
#define MG_DISABLE_SYNC_RESOLVER 1
#define MG_DISABLE_POPEN 1
/* Only SPIFFS supports directories, SLFS does not. */
#if defined(CC3200_FS_SPIFFS) && !defined(MG_ENABLE_DIRECTORY_LISTING)
...
...
@@ -657,8 +655,6 @@ struct dirent *readdir(DIR *dir);
#define MG_SOCKET_SIMPLELINK 1
#define MG_DISABLE_SOCKETPAIR 1
#define MG_DISABLE_SYNC_RESOLVER 1
#define MG_DISABLE_POPEN 1
#define MG_DISABLE_DAV 1
/* Amalgamated: #include "common/platforms/simplelink/cs_simplelink.h" */
...
...
@@ -1389,10 +1385,6 @@ const char *c_strnstr(const char *s, const char *find, size_t slen);
#define MG_DISABLE_PFS 0
#endif
#ifndef MG_DISABLE_POPEN
#define MG_DISABLE_POPEN 0
#endif
#ifndef MG_DISABLE_RESOLVER
#define MG_DISABLE_RESOLVER 0
#endif
...
...
@@ -1458,6 +1450,10 @@ const char *c_strnstr(const char *s, const char *find, size_t slen);
#define MG_ENABLE_HTTP_SSI MG_ENABLE_FILESYSTEM
#endif
#ifndef MG_ENABLE_HTTP_SSI_EXEC
#define MG_ENABLE_HTTP_SSI_EXEC 0
#endif
#ifndef MG_ENABLE_HTTP_STREAMING_MULTIPART
#define MG_ENABLE_HTTP_STREAMING_MULTIPART 0
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment