From 2ae8b6259283c1350b438037855ed2d234d08c89 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 11 Dec 2020 13:42:02 +0100 Subject: [PATCH] cgi_show_request(): Use the https headers if the page is reached through https:// Previously Privoxy would use the http headers which may be empty on a reused connection. --- cgisimple.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cgisimple.c b/cgisimple.c index e1a893be..31030343 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -260,7 +260,13 @@ jb_err cgi_show_request(struct client_state *csp, } if (map(exports, "processed-request", 1, - html_encode_and_free_original(list_to_text(csp->headers)), 0)) + html_encode_and_free_original( +#ifdef FEATURE_HTTPS_INSPECTION + csp->http->ssl ? + list_to_text(csp->https_headers) : +#endif + list_to_text(csp->headers) + ), 0)) { free_map(exports); return JB_ERR_MEMORY; -- 2.39.2