commit 28223f6a59f15afbb35c3d8d813f296598a62c3b
parent 678dcd0931b9d98b7831f224801aaf54ff9596c2
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Tue, 8 Jun 2021 21:02:57 +0300
keepalive_possible(): check whether app requested close
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -1145,6 +1145,10 @@ keepalive_possible (struct MHD_Connection *connection)
if ( (NULL != connection->response) &&
(0 != (connection->response->flags & MHD_RF_HTTP_VERSION_1_0_ONLY) ) )
return MHD_NO;
+ if ( (NULL != connection->response) &&
+ (0 != (connection->response->flags_auto
+ & MHD_RAF_HAS_CONNECTION_CLOSE) ) )
+ return MHD_NO;
if (MHD_IS_HTTP_VER_1_1_COMPAT (connection->http_ver) &&
( (NULL == connection->response) ||