mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-26 12:14:56 +00:00
Refactor mg_http_reply and mg_http_printf_chunk to use less allocs and mem copies
This commit is contained in:
1 parent
17e2fdd4cb
commit
bd7ee0d1e8
4 files changed
+55
-35
No files matched your search
+1
-1
@@ -1870,7 +1870,7 @@ static void eh2(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
mg_http_printf_chunk(c, LONG_CHUNK);
|
||||
c->label[0] = 1;
|
||||
} else if (ev == MG_EV_POLL) {
|
||||
if (c->label[0] > 0 && c->send.len == 0) c->label[0]++;
|
||||
if (c->label[0] > 0 && c->label[0] != 'x') c->label[0]++;
|
||||
if (c->label[0] > 10 && c->label[0] != 'x') {
|
||||
mg_http_printf_chunk(c, "chunk 1");
|
||||
mg_http_printf_chunk(c, "chunk 2");
|
||||
|
||||
Reference in new issue
Block a user