gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 03/03: test_get_chunked: set footer when last chunk is b


From: gnunet
Subject: [libmicrohttpd] 03/03: test_get_chunked: set footer when last chunk is being sending
Date: Sun, 15 Aug 2021 14:58:30 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 466a56e3afea831bc8c215d32c6904f2f05c7e0d
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Aug 15 15:45:44 2021 +0300

    test_get_chunked: set footer when last chunk is being sending
---
 src/testcurl/test_get_chunked.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c
index 79b0614c..cb46b6dc 100644
--- a/src/testcurl/test_get_chunked.c
+++ b/src/testcurl/test_get_chunked.c
@@ -137,14 +137,16 @@ crc (void *cls,
 {
   struct MHD_Response **responseptr = cls;
 
-  if (resp_empty || (pos == RESP_SIZE))
-  {
+  if (resp_empty || (pos == RESP_SIZE - RESP_BLOCK_SIZE))
+  { /* Add footer with the last block */
     if (MHD_YES != MHD_add_response_footer (*responseptr,
                                             RESP_FOOTER_NAME,
                                             RESP_FOOTER_VALUE))
       abort ();
-    return MHD_CONTENT_READER_END_OF_STREAM;
   }
+  if (resp_empty || (pos == RESP_SIZE))
+    return MHD_CONTENT_READER_END_OF_STREAM;
+
   if (max < RESP_BLOCK_SIZE)
     abort ();                   /* should not happen in this testcase... */
   memset (buf, 'A' + (pos / RESP_BLOCK_SIZE), RESP_BLOCK_SIZE);

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