From: Fabian Keil Date: Sun, 7 Jun 2020 07:53:36 +0000 (+0200) Subject: Log the "Request:" message for unencrypted requests later X-Git-Tag: v_3_0_29~301 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=61478413a02d7be37d44efb5c0c997a39a9da463 Log the "Request:" message for unencrypted requests later In b94bbe62a I moved the block in front of the setting of csp->http->client_ssl which meant the message was emitted for encrypted requests as well. This resulted in two "Request:" message instead of one. Sponsored by: Robert Klemme --- diff --git a/jcc.c b/jcc.c index 0654f808..37472c81 100644 --- a/jcc.c +++ b/jcc.c @@ -3553,17 +3553,6 @@ static void chat(struct client_state *csp) { return; } -#ifdef FEATURE_HTTPS_INSPECTION - /* - * Log the request unless we're https inspecting - * in which case we don't have the path yet and - * will log the request later. - */ - if (!client_use_ssl(csp)) -#endif - { - log_error(LOG_LEVEL_REQUEST, "%s%s", http->hostport, http->path); - } /* decide how to route the HTTP request */ fwd = forward_url(csp, http); @@ -3648,6 +3637,18 @@ static void chat(struct client_state *csp) } #endif +#ifdef FEATURE_HTTPS_INSPECTION + /* + * Log the request unless we're https inspecting + * in which case we don't have the path yet and + * will log the request later. + */ + if (!client_use_ssl(csp)) +#endif + { + log_error(LOG_LEVEL_REQUEST, "%s%s", http->hostport, http->path); + } + if (http->ssl && connect_port_is_forbidden(csp)) { const char *acceptable_connect_ports =