From 600f26e80bd496757dae911c8fffbba3444cad50 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 1 Feb 2021 13:14:16 +0100 Subject: [PATCH] continue_https_chat(): Explicitly unset CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE ... if process_encrypted_request() fails. This makes it more obvious that the connection will not be reused. Previously serve() relied on CSP_FLAG_SERVER_CONTENT_LENGTH_SET and CSP_FLAG_CHUNKED being unset. Inspired by a patch from Joshua Rogers. --- jcc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/jcc.c b/jcc.c index 8c34236f..8283add6 100644 --- a/jcc.c +++ b/jcc.c @@ -2907,6 +2907,7 @@ static void continue_https_chat(struct client_state *csp) if (JB_ERR_OK != process_encrypted_request(csp)) { + csp->flags &= ~CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE; return; } -- 2.39.2