[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 01/03: connection: do not spend time on building footers
From: |
gnunet |
Subject: |
[libmicrohttpd] 01/03: connection: do not spend time on building footers for zero-sized responses |
Date: |
Sat, 05 Jun 2021 14:39:16 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 9ca0b36ab0de26a0e2564f27fa25b6680965c196
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Jun 4 12:59:45 2021 +0300
connection: do not spend time on building footers for zero-sized responses
Footers are not used for non-chunked responses.
---
src/microhttpd/connection.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 938031c4..321952eb 100644
--- 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))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.