mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 23:49:44 +08:00
On new connection, clear off receiving buffer
This commit is contained in:
parent
0263e39584
commit
0b09df97ac
@ -4637,6 +4637,9 @@ static void process_new_connection(struct mg_connection *conn) {
|
||||
|
||||
keep_alive_enabled = !strcmp(conn->ctx->config[ENABLE_KEEP_ALIVE], "yes");
|
||||
|
||||
// Important: on new connection, reset the receiving buffer. Credit goes
|
||||
// to crule42.
|
||||
conn->data_len = 0;
|
||||
do {
|
||||
reset_per_request_attributes(conn);
|
||||
conn->request_len = read_request(NULL, conn, conn->buf, conn->buf_size,
|
||||
|
Loading…
x
Reference in New Issue
Block a user