gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 05/10: connection_reset(): notify app with correct code


From: gnunet
Subject: [libmicrohttpd] 05/10: connection_reset(): notify app with correct code
Date: Wed, 29 Sep 2021 19:52:47 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit ccd75de5b8513c5d78d5304ccc318b32b25a1844
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Sep 29 17:31:29 2021 +0300

    connection_reset(): notify app with correct code
---
 src/microhttpd/connection.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index a2049527..941b21a3 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -4078,6 +4078,8 @@ connection_reset (struct MHD_Connection *connection,
     /* Next function will destroy response, notify client,
      * destroy memory pool, and set connection state to "CLOSED" */
     MHD_connection_close_ (connection,
+                           c->stop_with_error ?
+                           MHD_REQUEST_TERMINATED_WITH_ERROR :
                            MHD_REQUEST_TERMINATED_COMPLETED_OK);
     c->read_buffer = NULL;
     c->read_buffer_size = 0;
@@ -4091,6 +4093,7 @@ connection_reset (struct MHD_Connection *connection,
   {
     /* Reset connection to process the next request */
     size_t new_read_buf_size;
+    mhd_assert (! c->stop_with_error);
 
     if ( (NULL != d->notify_completed) &&
          (c->client_aware) )

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