libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 96a0da03fecf39a530928c0223d16ba517a80473
parent af3fc639b339e60d7d626d8809589b32548f4dcb
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 11 Aug 2021 22:25:11 +0300

response.c: used stricter check for "Upgrade:" header

Diffstat:
Msrc/microhttpd/response.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -1616,13 +1616,15 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response, return MHD_NO; if (NULL == - MHD_get_response_header (response, - MHD_HTTP_HEADER_UPGRADE)) + MHD_get_response_element_n_ (response, MHD_HEADER_KIND, + MHD_HTTP_HEADER_UPGRADE, + MHD_STATICSTR_LEN_ ( \ + MHD_HTTP_HEADER_UPGRADE))) { #ifdef HAVE_MESSAGES MHD_DLOG (daemon, - _ ( - "Invalid response for upgrade: application failed to set the 'Upgrade' header!\n")); + _ ("Invalid response for upgrade: " \ + "application failed to set the 'Upgrade' header!\n")); #endif return MHD_NO; }