mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
Fix #1326 - spelling errors
This commit is contained in:
parent
568484f079
commit
a36050ab4b
@ -1,7 +1,7 @@
|
|||||||
# A complete device dashboard
|
# A complete device dashboard
|
||||||
|
|
||||||
This example is a demonstration of how Mongoose Library could be integrated
|
This example is a demonstration of how Mongoose Library could be integrated
|
||||||
into an embedded device and provide a complete device dashbord with the
|
into an embedded device and provide a complete device dashboard with the
|
||||||
following features:
|
following features:
|
||||||
|
|
||||||
- Multiple logins with different permissions (admin and user)
|
- Multiple logins with different permissions (admin and user)
|
||||||
@ -14,7 +14,7 @@ following features:
|
|||||||
- Live video stream
|
- Live video stream
|
||||||
|
|
||||||
|
|
||||||
In essense, this example is a combination of several other examples
|
In essence, this example is a combination of several other examples
|
||||||
pulled together (multiple-logins, dashboard, live-log, video-stream).
|
pulled together (multiple-logins, dashboard, live-log, video-stream).
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
|
@ -25,7 +25,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
|||||||
struct mg_tls_opts opts = {
|
struct mg_tls_opts opts = {
|
||||||
//.ca = "ca.pem", // Uncomment to enable two-way SSL
|
//.ca = "ca.pem", // Uncomment to enable two-way SSL
|
||||||
.cert = "server.pem", // Certificate PEM file
|
.cert = "server.pem", // Certificate PEM file
|
||||||
.certkey = "server.pem", // This pem conains both cert and key
|
.certkey = "server.pem", // This pem contains both cert and key
|
||||||
};
|
};
|
||||||
mg_tls_init(c, &opts);
|
mg_tls_init(c, &opts);
|
||||||
} else if (ev == MG_EV_HTTP_MSG) {
|
} else if (ev == MG_EV_HTTP_MSG) {
|
||||||
|
@ -1468,7 +1468,7 @@ static int uri_to_path(struct mg_connection *c, struct mg_http_message *hm,
|
|||||||
} else if (!(fs->stat(root_dir, NULL, NULL) & MG_FS_DIR)) {
|
} else if (!(fs->stat(root_dir, NULL, NULL) & MG_FS_DIR)) {
|
||||||
mg_http_reply(c, 400, "", "Invalid web root [%s]\n", root_dir);
|
mg_http_reply(c, 400, "", "Invalid web root [%s]\n", root_dir);
|
||||||
} else {
|
} else {
|
||||||
// NOTE(lsm): Xilinx snprintf does not 0-terminate the detination for
|
// NOTE(lsm): Xilinx snprintf does not 0-terminate the destination for
|
||||||
// the %.*s specifier, if the length is zero. Make sure hm->uri.len > 0
|
// the %.*s specifier, if the length is zero. Make sure hm->uri.len > 0
|
||||||
size_t n1 = strlen(root_dir), n2;
|
size_t n1 = strlen(root_dir), n2;
|
||||||
// Temporarily append URI to the root_dir: that is the unresolved path
|
// Temporarily append URI to the root_dir: that is the unresolved path
|
||||||
|
@ -697,7 +697,7 @@ static int uri_to_path(struct mg_connection *c, struct mg_http_message *hm,
|
|||||||
} else if (!(fs->stat(root_dir, NULL, NULL) & MG_FS_DIR)) {
|
} else if (!(fs->stat(root_dir, NULL, NULL) & MG_FS_DIR)) {
|
||||||
mg_http_reply(c, 400, "", "Invalid web root [%s]\n", root_dir);
|
mg_http_reply(c, 400, "", "Invalid web root [%s]\n", root_dir);
|
||||||
} else {
|
} else {
|
||||||
// NOTE(lsm): Xilinx snprintf does not 0-terminate the detination for
|
// NOTE(lsm): Xilinx snprintf does not 0-terminate the destination for
|
||||||
// the %.*s specifier, if the length is zero. Make sure hm->uri.len > 0
|
// the %.*s specifier, if the length is zero. Make sure hm->uri.len > 0
|
||||||
size_t n1 = strlen(root_dir), n2;
|
size_t n1 = strlen(root_dir), n2;
|
||||||
// Temporarily append URI to the root_dir: that is the unresolved path
|
// Temporarily append URI to the root_dir: that is the unresolved path
|
||||||
|
Loading…
Reference in New Issue
Block a user