mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
Add reponse end to the http dir list
This commit is contained in:
parent
2f3f1357c8
commit
ef89776517
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user