libmicrohttpd

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

commit 17a75e59233b8af60b4135f297a187fdad7929b2
parent 67f0f76b90a8564ef45ef55e6be6e6a973f66ebc
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Thu, 13 Jul 2017 22:30:32 +0300

Do not "keep-alive" if "upgrade" was requested

Diffstat:
Msrc/microhttpd/connection.c | 9++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -1113,13 +1113,8 @@ keepalive_possible (struct MHD_Connection *connection) if (MHD_lookup_header_s_token_ci (connection, MHD_HTTP_HEADER_CONNECTION, "upgrade")) - { -#ifdef UPGRADE_SUPPORT - if ( (NULL == connection->response) || - (NULL == connection->response->upgrade_handler) ) -#endif /* UPGRADE_SUPPORT */ - return MHD_NO; - } + return MHD_NO; + if (MHD_lookup_header_s_token_ci (connection, MHD_HTTP_HEADER_CONNECTION, "close"))