From: Fabian Keil <fk@fabiankeil.de>
Date: Mon, 1 Feb 2021 12:14:16 +0000 (+0100)
Subject: continue_https_chat(): Explicitly unset CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE
X-Git-Tag: v_3_0_32~97
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/@default-cgi@/$4?a=commitdiff_plain;h=600f26e80bd496757dae911c8fffbba3444cad50;p=privoxy.git

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.
---

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;
    }