gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 08/08: MHD_set_response_options(): check whether the new


From: gnunet
Subject: [libmicrohttpd] 08/08: MHD_set_response_options(): check whether the new flags could be used
Date: Sun, 13 Mar 2022 18:33:31 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit f2565a62da98879ac60fc17b633a88021f37faa9
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Mar 13 20:31:45 2022 +0300

    MHD_set_response_options(): check whether the new flags could be used
---
 src/microhttpd/response.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index e12b44a8..fbee6308 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -895,8 +895,15 @@ MHD_set_response_options (struct MHD_Response *response,
   enum MHD_Result ret;
   enum MHD_ResponseOptions ro;
 
+  if ( (0 != (response->flags & MHD_RF_INSANITY_HEADER_CONTENT_LENGTH)) &&
+       (0 == (flags & MHD_RF_INSANITY_HEADER_CONTENT_LENGTH)))
+  { /* Request to remove MHD_RF_INSANITY_HEADER_CONTENT_LENGTH flag */
+    if (0 != (response->flags_auto & MHD_RAF_HAS_CONTENT_LENGTH))
+      return MHD_NO;
+  }
   ret = MHD_YES;
   response->flags = flags;
+
   va_start (ap, flags);
   while (MHD_RO_END != (ro = va_arg (ap, enum MHD_ResponseOptions)))
   {

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