gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 03/04: connection: skip no-op calling of body generation


From: gnunet
Subject: [libmicrohttpd] 03/04: connection: skip no-op calling of body generation functions when response body is not used
Date: Tue, 27 Sep 2022 13:59:22 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit ebb17e5da7ea1cca1a2ffa25ef66d6ae3fe764f6
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Sep 27 14:54:05 2022 +0300

    connection: skip no-op calling of body generation functions when response 
body is not used
---
 src/microhttpd/connection.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index f33f9a9f..7624711a 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -5091,10 +5091,15 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
       }
 #endif /* UPGRADE_SUPPORT */
 
-      if (connection->rp.props.chunked)
-        connection->state = MHD_CONNECTION_CHUNKED_BODY_UNREADY;
+      if (connection->rp.props.send_reply_body)
+      {
+        if (connection->rp.props.chunked)
+          connection->state = MHD_CONNECTION_CHUNKED_BODY_UNREADY;
+        else
+          connection->state = MHD_CONNECTION_NORMAL_BODY_UNREADY;
+      }
       else
-        connection->state = MHD_CONNECTION_NORMAL_BODY_UNREADY;
+        connection->state = MHD_CONNECTION_FOOTERS_SENT;
       continue;
     case MHD_CONNECTION_NORMAL_BODY_READY:
       /* nothing to do here */

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]