gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 02/04: Fixed: always close connection if "close" was req


From: gnunet
Subject: [libmicrohttpd] 02/04: Fixed: always close connection if "close" was requested by client
Date: Tue, 17 Aug 2021 20:38:34 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 3fa1d302d22fb1e3553a057039054f515386e59d
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Aug 17 21:32:29 2021 +0300

    Fixed: always close connection if "close" was requested by client
---
 src/microhttpd/connection.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 83126b5d..1e309620 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1182,6 +1182,11 @@ keepalive_possible (struct MHD_Connection *connection)
   if (! MHD_IS_HTTP_VER_SUPPORTED (connection->http_ver))
     return MHD_NO;
 
+  if (MHD_lookup_header_s_token_ci (connection,
+                                    MHD_HTTP_HEADER_CONNECTION,
+                                    "close"))
+    return MHD_NO;
+
   if (MHD_IS_HTTP_VER_1_1_COMPAT (connection->http_ver) &&
       ( (NULL == connection->response) ||
         (0 == (connection->response->flags
@@ -1192,11 +1197,6 @@ keepalive_possible (struct MHD_Connection *connection)
                                       "upgrade"))
       return MHD_NO;
 
-    if (MHD_lookup_header_s_token_ci (connection,
-                                      MHD_HTTP_HEADER_CONNECTION,
-                                      "close"))
-      return MHD_NO;
-
     return MHD_YES;
   }
   if (MHD_HTTP_VER_1_0 == connection->http_ver)

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