commit 8629a47f831d7b6b56300039035c188fb6eaa65e parent cec5aed907524f47ee06ebc4f9704441df5d1023 Author: Evgeny Grin (Karlson2k) <k2k@narod.ru> Date: Wed, 8 Nov 2023 16:39:58 +0300 Upgraded connection: added missing check Diffstat:
| M | src/microhttpd/response.c | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git 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;