[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.
- [libmicrohttpd] branch master updated (1a46bfd6 -> f2565a62), gnunet, 2022/03/13
- [libmicrohttpd] 04/08: Disallowed successful responses for CONNECT requests, gnunet, 2022/03/13
- [libmicrohttpd] 03/08: Added warning in log if application-defined Content-Length is used, gnunet, 2022/03/13
- [libmicrohttpd] 02/08: Added separate internal "responseIcy" flag., gnunet, 2022/03/13
- [libmicrohttpd] 01/08: upgrade response: set response size to zero, gnunet, 2022/03/13
- [libmicrohttpd] 06/08: MHD_queue_response(): refuse 101 code when not supported, gnunet, 2022/03/13
- [libmicrohttpd] 05/08: MHD_queue_response(): clarified log message, gnunet, 2022/03/13
- [libmicrohttpd] 07/08: Simplified function for determining needs for reply body and headers, gnunet, 2022/03/13
- [libmicrohttpd] 08/08: MHD_set_response_options(): check whether the new flags could be used,
gnunet <=