mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-20 19:41:58 +00:00
Re-enable mongosoe FS support on ESP
PUBLISHED_FROM=cfa1c79bb5429feddf38c68c25195b97deef9a62
This commit is contained in:
1 parent
97063937ff
commit
910aee7f7b
1 file changed
+3
-1
+3
-1
@@ -5519,7 +5519,7 @@ static void handle_propfind(struct mg_connection *nc, const char *path,
|
|||||||
static void handle_mkcol(struct mg_connection *nc, const char *path,
|
static void handle_mkcol(struct mg_connection *nc, const char *path,
|
||||||
struct http_message *hm) {
|
struct http_message *hm) {
|
||||||
int status_code = 500;
|
int status_code = 500;
|
||||||
if (mg_get_http_header(hm, "Content-Length") != NULL) {
|
if (hm->body.len != (size_t) ~0 && hm->body.len > 0) {
|
||||||
status_code = 415;
|
status_code = 415;
|
||||||
} else if (!mg_mkdir(path, 0755)) {
|
} else if (!mg_mkdir(path, 0755)) {
|
||||||
status_code = 201;
|
status_code = 201;
|
||||||
@@ -5529,6 +5529,8 @@ static void handle_mkcol(struct mg_connection *nc, const char *path,
|
|||||||
status_code = 403;
|
status_code = 403;
|
||||||
} else if (errno == ENOENT) {
|
} else if (errno == ENOENT) {
|
||||||
status_code = 409;
|
status_code = 409;
|
||||||
|
} else {
|
||||||
|
status_code = 500;
|
||||||
}
|
}
|
||||||
send_http_error(nc, status_code, NULL);
|
send_http_error(nc, status_code, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user