summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-06-14 10:57:23 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-06-20 23:22:56 +0300
commit5a9f64bc6a497a41f0cbcd80ee883e0747c08a98 (patch)
treece5f8db2ab3060dea1cdc7cb7f937814c6f81399
parent2e996ee5c2cbf9cb36b12c1152d81b1477607b2c (diff)
connection: fixed pipelined requests processing
-rw-r--r--src/microhttpd/connection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 4716eb0f..0c49a39d 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -6159,7 +6159,9 @@ connection_reset (struct MHD_Connection *connection,
c->keepalive = MHD_CONN_KEEPALIVE_UNKOWN;
c->state = MHD_CONNECTION_INIT;
- c->event_loop_info = MHD_EVENT_LOOP_INFO_READ;
+ c->event_loop_info =
+ (0 == c->read_buffer_offset) ?
+ MHD_EVENT_LOOP_INFO_READ : MHD_EVENT_LOOP_INFO_PROCESS;
memset (&c->rq, 0, sizeof(c->rq));