cgi_show_request(): Use the https headers if the page is reached through https://
authorFabian Keil <fk@fabiankeil.de>
Fri, 11 Dec 2020 12:42:02 +0000 (13:42 +0100)
committerFabian Keil <fk@fabiankeil.de>
Mon, 14 Dec 2020 07:49:16 +0000 (08:49 +0100)
Previously Privoxy would use the http headers which
may be empty on a reused connection.

cgisimple.c

index e1a893b..3103034 100644 (file)
@@ -260,7 +260,13 @@ jb_err cgi_show_request(struct client_state *csp,
    }
 
    if (map(exports, "processed-request", 1,
    }
 
    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;
    {
       free_map(exports);
       return JB_ERR_MEMORY;