gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 04/07: Upgraded connection: added missing check


From: gnunet
Subject: [libmicrohttpd] 04/07: Upgraded connection: added missing check
Date: Wed, 08 Nov 2023 18:23:06 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 8629a47f831d7b6b56300039035c188fb6eaa65e
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Nov 8 16:39:58 2023 +0300

    Upgraded connection: added missing check
---
 src/microhttpd/response.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index d592007d..78e874d0 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -1953,6 +1953,15 @@ MHD_response_execute_upgrade_ (struct MHD_Response 
*response,
                                            MHD_STATICSTR_LEN_ ( \
                                              MHD_HTTP_HEADER_UPGRADE)));
 
+  if (! connection->sk_nonblck)
+  {
+#ifdef HAVE_MESSAGES
+    MHD_DLOG (daemon,
+              _ ("Cannot execute \"upgrade\" as the socket is in " \
+                 "the blocking mode.\n"));
+#endif
+    return MHD_NO;
+  }
   urh = MHD_calloc_ (1, sizeof (struct MHD_UpgradeResponseHandle));
   if (NULL == urh)
     return MHD_NO;

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