Merge pull request #1581 from behnejad/patch-1

fixing offset of Content-Length value.
This commit is contained in:
Sergey Lyubka authored and GitHub committed 2022-06-07 08:35:24 +01:00
commit c701315ab5
1 file changed
+1 -1
+1 -1
View File
@@ -616,7 +616,7 @@ static void listdir(struct mg_connection *c, struct mg_http_message *hm,
MG_VERSION);
n = mg_snprintf(tmp, sizeof(tmp), "%lu", (unsigned long) (c->send.len - off));
if (n > sizeof(tmp)) n = 0;
memcpy(c->send.buf + off - 10, tmp, n); // Set content length
memcpy(c->send.buf + off - 12, tmp, n); // Set content length
}
static void remove_double_dots(char *s) {