mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-13 17:00:19 +00:00
C89 compatibility for http-restful-server
This commit is contained in:
1 parent
09275ae4ca
commit
a74fb940aa
1 file changed
+3
-1
@@ -82,7 +82,9 @@ static void fn(struct mg_connection *c, int ev, void *ev_data) {
|
|||||||
mg_http_reply(c, 200, "", "{\"result\": \"%.*s\"}\n", hm->uri.len,
|
mg_http_reply(c, 200, "", "{\"result\": \"%.*s\"}\n", hm->uri.len,
|
||||||
hm->uri.buf);
|
hm->uri.buf);
|
||||||
} else {
|
} else {
|
||||||
struct mg_http_serve_opts opts = {.root_dir = s_root_dir};
|
struct mg_http_serve_opts opts;
|
||||||
|
memset(&opts, 0, sizeof(opts));
|
||||||
|
opts.root_dir = s_root_dir;
|
||||||
mg_http_serve_dir(c, ev_data, &opts);
|
mg_http_serve_dir(c, ev_data, &opts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user