[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 06/07: reply: warn if manual "Content-Length" is used wh
From: |
gnunet |
Subject: |
[libmicrohttpd] 06/07: reply: warn if manual "Content-Length" is used when this header is not allowed |
Date: |
Mon, 07 Mar 2022 19:36:13 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 56a7664a729419a08ae3223a48ef0fad1cca4369
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Mar 7 21:27:58 2022 +0300
reply: warn if manual "Content-Length" is used when this header is not
allowed
---
src/microhttpd/connection.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 88b1f21d..def03b68 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1833,6 +1833,15 @@ check_connection_reply (struct MHD_Connection
*connection)
"Non-empty response body is ignored and not used.\n"),
(unsigned) (c->responseCode & (~MHD_ICY_FLAG)));
}
+ if ( (! c->rp_props.use_reply_body_headers) &&
+ (0 != (r->flags_auto & MHD_RAF_HAS_CONTENT_LENGTH)) )
+ {
+ MHD_DLOG (c->daemon,
+ _ ("This reply with response code %u cannot use reply body. "
+ "Application defined \"Content-Length\" header violates"
+ "HTTP specification.\n"),
+ (unsigned) (c->responseCode & (~MHD_ICY_FLAG)));
+ }
#else
(void) c; /* Mute compiler warning */
(void) r; /* Mute compiler warning */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (02634d01 -> 1a46bfd6), gnunet, 2022/03/07
- [libmicrohttpd] 01/07: connection.c: added function to check used reply, gnunet, 2022/03/07
- [libmicrohttpd] 07/07: memorypool: fixed: unpoison memory for ASAN before destroying pool, gnunet, 2022/03/07
- [libmicrohttpd] 04/07: response.c: fixed coding style, gnunet, 2022/03/07
- [libmicrohttpd] 03/07: response: added automatic flag MHD_RAF_HAS_CONTENT_LENGTH, gnunet, 2022/03/07
- [libmicrohttpd] 05/07: response headers: do not add automatic "Content-Length" header if response already has it, gnunet, 2022/03/07
- [libmicrohttpd] 06/07: reply: warn if manual "Content-Length" is used when this header is not allowed,
gnunet <=
- [libmicrohttpd] 02/07: MHD_queue_response(): improved doxy, gnunet, 2022/03/07