commit 9ca0b36ab0de26a0e2564f27fa25b6680965c196 parent cdc1db3d2f1f9f68b2bc35b3903f49480a9181a7 Author: Evgeny Grin (Karlson2k) <k2k@narod.ru> Date: Fri, 4 Jun 2021 12:59:45 +0300 connection: do not spend time on building footers for zero-sized responses Footers are not used for non-chunked responses. Diffstat:
| M | src/microhttpd/connection.c | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -3779,7 +3779,11 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) if (NULL != connection->response->crc) MHD_mutex_unlock_chk_ (&connection->response->mutex); #endif - connection->state = MHD_CONNECTION_BODY_SENT; + /* TODO: replace with 'use_chunked_send' */ + if (connection->have_chunked_upload) + connection->state = MHD_CONNECTION_BODY_SENT; + else + connection->state = MHD_CONNECTION_FOOTERS_SENT; continue; } if (MHD_NO != try_ready_normal_body (connection))