gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 01/02: chunked_example: enforce to use chunked encoding


From: gnunet
Subject: [libmicrohttpd] 01/02: chunked_example: enforce to use chunked encoding
Date: Thu, 06 May 2021 10:29:36 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 81bbdc7048ca31ebe23c00918e8a5b5852b0f687
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Apr 30 18:02:00 2021 +0300

    chunked_example: enforce to use chunked encoding
    
    Previously MHD switches to identity encoding if connection
    is not Keep-Alive
---
 src/examples/chunked_example.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/examples/chunked_example.c b/src/examples/chunked_example.c
index 6f449c3a..ed20d472 100644
--- a/src/examples/chunked_example.c
+++ b/src/examples/chunked_example.c
@@ -137,6 +137,14 @@ ahc_echo (void *cls,
     free (callback_param);
     return MHD_NO;
   }
+  /* Enforce chunked response, even for non-keep-alive connection. */
+  if (MHD_NO == MHD_add_response_header (response,
+                                         MHD_HTTP_HEADER_TRANSFER_ENCODING,
+                                         "chunked"))
+  {
+    free (callback_param);
+    return MHD_NO;
+  }
   ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
   MHD_destroy_response (response);
   return ret;

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