From ef89776517f12047fc03a44ef222886b70a9577c Mon Sep 17 00:00:00 2001 From: cpq Date: Sun, 28 Aug 2022 13:58:41 +0100 Subject: [PATCH] Add reponse end to the http dir list --- mongoose.c | 1 + src/http.c | 1 + 2 files changed, 2 insertions(+) diff --git a/mongoose.c b/mongoose.c index 98398983..228f860a 100644 --- a/mongoose.c +++ b/mongoose.c @@ -1975,6 +1975,7 @@ static void listdir(struct mg_connection *c, struct mg_http_message *hm, n = mg_snprintf(tmp, sizeof(tmp), "%lu", (unsigned long) (c->send.len - off)); if (n > sizeof(tmp)) n = 0; memcpy(c->send.buf + off - 12, tmp, n); // Set content length + c->is_resp = 0; // Mark response end } // Resolve requested file into `path` and return its fs->st() result diff --git a/src/http.c b/src/http.c index b5c87b1b..fd06045e 100644 --- a/src/http.c +++ b/src/http.c @@ -637,6 +637,7 @@ static void listdir(struct mg_connection *c, struct mg_http_message *hm, n = mg_snprintf(tmp, sizeof(tmp), "%lu", (unsigned long) (c->send.len - off)); if (n > sizeof(tmp)) n = 0; memcpy(c->send.buf + off - 12, tmp, n); // Set content length + c->is_resp = 0; // Mark response end } // Resolve requested file into `path` and return its fs->st() result