gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] 07/10: transmit_error_response(): discard r


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 07/10: transmit_error_response(): discard read buffer to free space for error response
Date: Mon, 17 Jun 2019 20:35:50 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 20767d5dec4abe6078ed73365cb566fe985a8319
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Mon Jun 17 11:25:56 2019 +0300

    transmit_error_response(): discard read buffer to free space for error 
response
---
 src/microhttpd/connection.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index b3ef9441..9b8d3e2b 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1995,6 +1995,16 @@ transmit_error_response (struct MHD_Connection 
*connection,
     }
   connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
   connection->read_closed = true;
+  if (0 != connection->read_buffer_size)
+    {
+      /* Read buffer is not needed anymore, discard it
+       * to free some space for error response. */
+      connection->read_buffer = MHD_pool_reallocate(connection->pool,
+                                                    connection->read_buffer,
+                                                    
connection->read_buffer_size,
+                                                    0);
+      connection->read_buffer_size = 0;
+    }
 #ifdef HAVE_MESSAGES
   MHD_DLOG (connection->daemon,
             _("Error processing request (HTTP response code is %u (`%s')). 
Closing connection.\n"),

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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