gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: Do not send dynamic response body


From: gnunet
Subject: [libmicrohttpd] branch master updated: Do not send dynamic response body with header
Date: Sun, 13 Dec 2020 11:13:45 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 9c70bc55 Do not send dynamic response body with header
9c70bc55 is described below

commit 9c70bc55517cc61804a1d88540305d0477557eb6
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Dec 13 13:12:51 2020 +0300

    Do not send dynamic response body with header
    
    Fixed regression introduced by 3b435274a2b3cd206201cc6140f2c70016a03bd2
    Do not use response dynamic data while responses have
    connection-specific data and need to be locked
---
 src/microhttpd/connection.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 8a06f7e2..100abbc0 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2919,14 +2919,16 @@ MHD_connection_handle_write (struct MHD_Connection 
*connection)
                   connection->write_buffer_send_offset);
       mhd_assert (NULL != connection->response);
       mhd_assert ( (0 == connection->response->data_size) || \
-                   (0 == connection->response->data_start) );
+                   (0 == connection->response->data_start) || \
+                   (NULL != connection->response->crc) );
       mhd_assert ( (0 == connection->response_write_position) || \
                    (response->total_size ==
                     connection->response_write_position) || \
                    (MHD_SIZE_UNKNOWN ==
                     connection->response_write_position) );
 
-      if (0 == connection->response_write_position)
+      if ( (NULL == connection->response->crc) &&
+           (0 == connection->response_write_position) )
       {
         /* Send response headers alongside the response body, if the body
          * data is available. */
@@ -2939,8 +2941,8 @@ MHD_connection_handle_write (struct MHD_Connection 
*connection)
       }
       else
       {
-        /* This is response for HEAD request or reply body is not allowed
-         * for any other reason. */
+        /* This is response for HEAD request, reply body is not allowed
+         * for any other reason or reply body is dynamically generated. */
         /* Do not send the body data even if it's available. */
         ret = MHD_send_on_connection2_ (connection,
                                         &connection->write_buffer

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