[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 10/13: MHD_connection_handle_read(): refactored states h
From: |
gnunet |
Subject: |
[libmicrohttpd] 10/13: MHD_connection_handle_read(): refactored states handling at the end of the function |
Date: |
Mon, 16 May 2022 20:14:59 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit f0a5b72f56f386803fd4efde86a0864c463e62f9
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon May 16 19:41:54 2022 +0300
MHD_connection_handle_read(): refactored states handling at the end of the
function
---
src/microhttpd/connection.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 7ae01a53..be9d65b1 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -4133,6 +4133,7 @@ MHD_connection_handle_read (struct MHD_Connection
*connection,
__FUNCTION__,
MHD_state_to_string (connection->state));
#endif
+ /* TODO: check whether the next 'switch()' really needed */
switch (connection->state)
{
case MHD_CONNECTION_INIT:
@@ -4162,8 +4163,9 @@ MHD_connection_handle_read (struct MHD_Connection
*connection,
mhd_assert (0);
return;
#endif /* UPGRADE_SUPPORT */
- default:
+ case MHD_CONNECTION_START_REPLY:
/* shrink read buffer to how much is actually used */
+ /* TODO: remove shrink as it handled in special function */
if ((0 != connection->read_buffer_size) &&
(connection->read_buffer_size != connection->read_buffer_offset))
{
@@ -4176,6 +4178,17 @@ MHD_connection_handle_read (struct MHD_Connection
*connection,
connection->read_buffer_size = connection->read_buffer_offset;
}
break;
+ case MHD_CONNECTION_HEADERS_SENDING:
+ case MHD_CONNECTION_HEADERS_SENT:
+ case MHD_CONNECTION_NORMAL_BODY_UNREADY:
+ case MHD_CONNECTION_NORMAL_BODY_READY:
+ case MHD_CONNECTION_CHUNKED_BODY_UNREADY:
+ case MHD_CONNECTION_CHUNKED_BODY_READY:
+ case MHD_CONNECTION_BODY_SENT:
+ case MHD_CONNECTION_FOOTERS_SENDING:
+ case MHD_CONNECTION_FOOTERS_SENT:
+ default:
+ mhd_assert (0); /* Should not be possible */
}
return;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 03/13: configure: use correct quoting in OS detection part, (continued)
- [libmicrohttpd] 03/13: configure: use correct quoting in OS detection part, gnunet, 2022/05/16
- [libmicrohttpd] 02/13: configure: additional warning flags, gnunet, 2022/05/16
- [libmicrohttpd] 06/13: internal.h: fixed incorrect use of enum value as preprocessor value, gnunet, 2022/05/16
- [libmicrohttpd] 04/13: configure: use standard Linux settings for Linux on ARM, gnunet, 2022/05/16
- [libmicrohttpd] 08/13: Added missing in 'switch' enum values (no functional change), gnunet, 2022/05/16
- [libmicrohttpd] 11/13: MHD_connection_update_event_loop_info(): more complete TLS states handling, gnunet, 2022/05/16
- [libmicrohttpd] 05/13: Use '#ifdef PARAM' instead of '#if PARAM' for configuration options, gnunet, 2022/05/16
- [libmicrohttpd] 09/13: daemon options: added missing HTTPS-related options error reports for non-HTTPS builds, gnunet, 2022/05/16
- [libmicrohttpd] 13/13: mhd_panic: minor macro improvement, gnunet, 2022/05/16
- [libmicrohttpd] 07/13: Fixed uninitialized value used in assert, gnunet, 2022/05/16
- [libmicrohttpd] 10/13: MHD_connection_handle_read(): refactored states handling at the end of the function,
gnunet <=
- [libmicrohttpd] 12/13: W32 projects: enabled more warnings, gnunet, 2022/05/16