[Privoxy-commits] [privoxy] 04/09: Don't forward connection options Privoxy doesn't understand
User Git
git at git.privoxy.org
Wed Jun 18 05:47:01 CEST 2025
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 6260031edfde3b3f3129c01097a814e044f2a17e
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Mon Feb 10 12:05:22 2025 +0100
Don't forward connection options Privoxy doesn't understand
---
parsers.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/parsers.c b/parsers.c
index 944a932f..605f54a0 100644
--- a/parsers.c
+++ b/parsers.c
@@ -1870,8 +1870,20 @@ static jb_err server_connection(struct client_state *csp, char **header)
if ((csp->flags & CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE))
{
- log_error(LOG_LEVEL_HEADER,
- "Keeping the server header '%s' around.", *header);
+ if (!strcmpic(*header, "Connection: keep-alive"))
+ {
+ log_error(LOG_LEVEL_HEADER,
+ "Keeping the server header '%s' around.", *header);
+ }
+ else
+ {
+ char *old_header = *header;
+
+ *header = strdup_or_die("Connection: keep-alive");
+ log_error(LOG_LEVEL_HEADER, "Replaced: \'%s\' with \'%s\'",
+ old_header, *header);
+ freez(old_header);
+ }
}
else
#endif /* FEATURE_CONNECTION_KEEP_ALIVE */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list