mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-17 10:49:47 +00:00
Add reponse end to the http dir list
This commit is contained in:
1 parent
2f3f1357c8
commit
ef89776517
2 files changed
+2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user