gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]