[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 03/08: Added warning in log if application-defined Conte
From: |
gnunet |
Subject: |
[libmicrohttpd] 03/08: Added warning in log if application-defined Content-Length is used |
Date: |
Sun, 13 Mar 2022 18:33:26 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit e74fad60005e8fb18b67ea77e84c9875a94d18a3
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Mar 10 16:59:56 2022 +0300
Added warning in log if application-defined Content-Length is used
---
src/microhttpd/connection.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 9611e0a7..e16d5ed1 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1,7 +1,7 @@
/*
This file is part of libmicrohttpd
Copyright (C) 2007-2020 Daniel Pittman and Christian Grothoff
- Copyright (C) 2015-2021 Evgeny Grin (Karlson2k)
+ Copyright (C) 2015-2022 Evgeny Grin (Karlson2k)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -5265,6 +5265,18 @@ MHD_queue_response (struct MHD_Connection *connection,
}
}
+#ifdef HAVE_MESSAGES
+ if ( (0 != (MHD_RF_INSANITY_HEADER_CONTENT_LENGTH & response->flags)) &&
+ (0 != (MHD_RAF_HAS_CONTENT_LENGTH & response->flags_auto)) )
+ {
+ MHD_DLOG (daemon,
+ _ ("The response has application-defined \"Content-Length\" " \
+ "header. The reply to the request will be not " \
+ "HTTP-compliant and may result in hung connection or " \
+ "other problems!\n"));
+ }
+#endif
+
MHD_increment_response_rc (response);
connection->response = response;
connection->responseCode = status_code;
--
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 <=
- [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, 2022/03/13