mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-21 09:23:10 +08:00
Re-enable mongosoe FS support on ESP
PUBLISHED_FROM=cfa1c79bb5429feddf38c68c25195b97deef9a62
This commit is contained in:
parent
97063937ff
commit
910aee7f7b
@ -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,
|
||||
struct http_message *hm) {
|
||||
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;
|
||||
} else if (!mg_mkdir(path, 0755)) {
|
||||
status_code = 201;
|
||||
@ -5529,6 +5529,8 @@ static void handle_mkcol(struct mg_connection *nc, const char *path,
|
||||
status_code = 403;
|
||||
} else if (errno == ENOENT) {
|
||||
status_code = 409;
|
||||
} else {
|
||||
status_code = 500;
|
||||
}
|
||||
send_http_error(nc, status_code, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user