mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
Add MG_HTTP_INDEX build var
This commit is contained in:
parent
4e75a0c81e
commit
9d38e26b81
@ -1474,7 +1474,7 @@ static int uri_to_path2(struct mg_connection *c, struct mg_http_message *hm,
|
||||
(int) hm->uri.len, hm->uri.ptr);
|
||||
flags = 0;
|
||||
} else if (flags & MG_FS_DIR) {
|
||||
if (((snprintf(path + n, path_size - n, "/index.html") > 0 &&
|
||||
if (((snprintf(path + n, path_size - n, "/" MG_HTTP_INDEX) > 0 &&
|
||||
(tmp = fs->stat(path, NULL, NULL)) != 0) ||
|
||||
(snprintf(path + n, path_size - n, "/index.shtml") > 0 &&
|
||||
(tmp = fs->stat(path, NULL, NULL)) != 0))) {
|
||||
|
@ -725,7 +725,7 @@ static int uri_to_path2(struct mg_connection *c, struct mg_http_message *hm,
|
||||
(int) hm->uri.len, hm->uri.ptr);
|
||||
flags = 0;
|
||||
} else if (flags & MG_FS_DIR) {
|
||||
if (((snprintf(path + n, path_size - n, "/index.html") > 0 &&
|
||||
if (((snprintf(path + n, path_size - n, "/" MG_HTTP_INDEX) > 0 &&
|
||||
(tmp = fs->stat(path, NULL, NULL)) != 0) ||
|
||||
(snprintf(path + n, path_size - n, "/index.shtml") > 0 &&
|
||||
(tmp = fs->stat(path, NULL, NULL)) != 0))) {
|
||||
|
Loading…
Reference in New Issue
Block a user