gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 01/08: upgrade response: set response size to zero


From: gnunet
Subject: [libmicrohttpd] 01/08: upgrade response: set response size to zero
Date: Sun, 13 Mar 2022 18:33:24 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit b26d68a71c1e001383d35bdfbc958d7caa2aedde
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Mar 8 10:35:47 2022 +0300

    upgrade response: set response size to zero
    
    Upgrade responses do not have body, so zero must be used as the body size.
---
 src/microhttpd/connection.c | 2 --
 src/microhttpd/response.c   | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index def03b68..3a1c3c43 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3968,8 +3968,6 @@ MHD_connection_handle_write (struct MHD_Connection 
*connection)
                    (NULL != resp->crc) );
       mhd_assert ( (0 == connection->response_write_position) || \
                    (resp->total_size ==
-                    connection->response_write_position) || \
-                   (MHD_SIZE_UNKNOWN ==
                     connection->response_write_position) );
       mhd_assert ((MHD_CONN_MUST_UPGRADE != connection->keepalive) || \
                   (! connection->rp_props.send_reply_body));
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 3fd98088..e12b44a8 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -1942,7 +1942,7 @@ MHD_create_response_for_upgrade (MHD_UpgradeHandler 
upgrade_handler,
 #endif
   response->upgrade_handler = upgrade_handler;
   response->upgrade_handler_cls = upgrade_handler_cls;
-  response->total_size = MHD_SIZE_UNKNOWN;
+  response->total_size = 0;
   response->reference_count = 1;
   if (MHD_NO ==
       MHD_add_response_header (response,

-- 
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]