gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 04/04: Fixed: avoid duplication of "close" token in repl


From: gnunet
Subject: [libmicrohttpd] 04/04: Fixed: avoid duplication of "close" token in replies
Date: Tue, 17 Aug 2021 20:38:36 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 16ac89f3beb982dab4f1552ffb94e637b45ca324
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Aug 17 21:34:41 2021 +0300

    Fixed: avoid duplication of "close" token in replies
---
 src/microhttpd/connection.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index dfa315e1..b7505762 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1705,7 +1705,9 @@ buffer_append (char *buf,
  * @param kind the kind of objects (headers or footers)
  * @param filter_transf_enc skip "Transfer-Encoding" header
  * @param add_close add "close" token to the
- *                  "Connection:" header (if any)
+ *                  "Connection:" header (if any), ignored if no "Connection:"
+ *                  header was added by user or if "close" token is already
+ *                  present in "Connection:" header
  * @param add_keep_alive add "Keep-Alive" token to the
  *                       "Connection:" header (if any)
  * @return true if succeed,
@@ -1737,6 +1739,8 @@ add_user_headers (char *buf,
     add_close = false;          /* No such header */
     add_keep_alive = false;     /* No such header */
   }
+  else if (0 != (r->flags_auto & MHD_RAF_HAS_CONNECTION_CLOSE))
+    add_close = false;          /* "close" token was already set */
 
   for (hdr = r->first_header; NULL != hdr; hdr = hdr->next)
   {

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