From: Fabian Keil Date: Fri, 11 Dec 2020 12:42:02 +0000 (+0100) Subject: cgi_show_request(): Use the https headers if the page is reached through https:// X-Git-Tag: v_3_0_30~270^2~37 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=2ae8b6259283c1350b438037855ed2d234d08c89 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. --- 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;