mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-14 10:20:01 +00:00
Add SSI include file=, include virtual=
This commit is contained in:
1 parent
86824795a0
commit
c7e09bd7b4
24 files changed
+289
-29
No files matched your search
+12
-1
@@ -349,7 +349,7 @@ static void eh1(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
struct mg_http_serve_opts opts = {".", NULL};
|
||||
mg_http_serve_dir(c, hm, &opts);
|
||||
} else {
|
||||
struct mg_http_serve_opts opts = {"./test/data", NULL};
|
||||
struct mg_http_serve_opts opts = {"./test/data", "#.shtml"};
|
||||
mg_http_serve_dir(c, hm, &opts);
|
||||
}
|
||||
} else if (ev == MG_EV_WS_MSG) {
|
||||
@@ -477,6 +477,17 @@ static void test_http_server(void) {
|
||||
"Content-Length: 4\r\n\r\nkuku") == 200);
|
||||
ASSERT(cmpbody(buf, "kuku") == 0);
|
||||
|
||||
ASSERT(fetch(&mgr, buf, url, "GET /ssi HTTP/1.1\r\n\r\n") == 200);
|
||||
ASSERT(cmpbody(buf,
|
||||
"this is index\n"
|
||||
"this is nested\n\n"
|
||||
"this is f1\n\n\n\n"
|
||||
"recurse\n\n"
|
||||
"recurse\n\n"
|
||||
"recurse\n\n"
|
||||
"recurse\n\n"
|
||||
"recurse\n\n") == 0);
|
||||
|
||||
ASSERT(fetch(&mgr, buf, url, "GET /badroot HTTP/1.0\r\n\n") == 400);
|
||||
#if MG_ARCH == MG_ARCH_WIN32
|
||||
ASSERT(cmpbody(buf, "Bad web root [Z:\\BAAADDD!]\n") == 0);
|
||||
|
||||
Reference in new issue
Block a user