mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-16 10:39:49 +00:00
Add struct mg_http_serve_opts::extra_headers
This commit is contained in:
1 parent
f326cbedbe
commit
6366c832b0
7 files changed
+29
-20
No files matched your search
+3
-3
@@ -337,7 +337,7 @@ static void eh1(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
} else if (mg_http_match_uri(hm, "/bar")) {
|
||||
mg_http_reply(c, 404, "", "not found");
|
||||
} else if (mg_http_match_uri(hm, "/badroot")) {
|
||||
struct mg_http_serve_opts opts = {"/BAAADDD!", NULL};
|
||||
struct mg_http_serve_opts opts = {"/BAAADDD!", NULL, NULL};
|
||||
mg_http_serve_dir(c, hm, &opts);
|
||||
} else if (mg_http_match_uri(hm, "/creds")) {
|
||||
char user[100], pass[100];
|
||||
@@ -346,10 +346,10 @@ static void eh1(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
} else if (mg_http_match_uri(hm, "/upload")) {
|
||||
mg_http_upload(c, hm, ".");
|
||||
} else if (mg_http_match_uri(hm, "/test/")) {
|
||||
struct mg_http_serve_opts opts = {".", NULL};
|
||||
struct mg_http_serve_opts opts = {".", NULL, "A: B\r\nC: D\r\n"};
|
||||
mg_http_serve_dir(c, hm, &opts);
|
||||
} else {
|
||||
struct mg_http_serve_opts opts = {"./test/data", "#.shtml"};
|
||||
struct mg_http_serve_opts opts = {"./test/data", "#.shtml", "C: D\r\n"};
|
||||
mg_http_serve_dir(c, hm, &opts);
|
||||
}
|
||||
} else if (ev == MG_EV_WS_MSG) {
|
||||
|
||||
Reference in new issue
Block a user