From 21665e367c2dc002092a019f269caf4016879337 Mon Sep 17 00:00:00 2001 From: Deomid Ryabkov Date: Tue, 26 Apr 2016 16:00:57 -0400 Subject: [PATCH] Auto-disable CGI if socketpair is disabled h/t @danielinux, cesanta/mongoose#652 PUBLISHED_FROM=68c9a86280d63d01b6e4cb72aa6cfd766e4d4be3 --- mongoose.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mongoose.c b/mongoose.c index e142a403..0a596232 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4122,6 +4122,11 @@ int mg_normalize_uri_path(const struct mg_str *in, struct mg_str *out) { #define MG_WS_NO_HOST_HEADER_MAGIC ((char *) 0x1) #endif +/* CGI requires socketpair. */ +#if defined(MG_DISABLE_SOCKETPAIR) && !defined(MG_DISABLE_CGI) +#define MG_DISABLE_CGI 1 +#endif + static const char *mg_version_header = "Mongoose/" MG_VERSION; enum mg_http_proto_data_type { DATA_NONE, DATA_FILE, DATA_PUT };