[Privoxy-commits] [privoxy] 03/11: serve(): Close the client socket as well
User Git
git at git.privoxy.org
Fri Mar 12 11:37:46 UTC 2021
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 2d8fefc484274b740933541778ae7ce1ae1045e7
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Sat Mar 6 11:52:10 2021 +0100
serve(): Close the client socket as well
... if the server socket for an inspected connection has been closed.
Privoxy currently can't establish a new server connection
when the client socket is reused and would drop the connection
in continue_https_chat() anyway.
---
jcc.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/jcc.c b/jcc.c
index ee408b3c..cd7bf710 100644
--- a/jcc.c
+++ b/jcc.c
@@ -4847,6 +4847,22 @@ static void serve(struct client_state *csp)
#endif
close_socket(csp->server_connection.sfd);
mark_connection_closed(&csp->server_connection);
+#ifdef FEATURE_HTTPS_INSPECTION
+ if (continue_chatting && client_use_ssl(csp))
+ {
+ /*
+ * Close the client socket as well as Privoxy currently
+ * can't establish a new server connection when the client
+ * socket is reused and would drop the connection in
+ * continue_https_chat() anyway.
+ */
+ continue_chatting = 0;
+ csp->flags &= ~CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE;
+ log_error(LOG_LEVEL_CONNECT,
+ "Client socket %d is no longer usable. "
+ "The server socket has been closed.", csp->cfd);
+ }
+#endif
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list