From 61478413a02d7be37d44efb5c0c997a39a9da463 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2020 09:53:36 +0200 Subject: [PATCH] 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 --- jcc.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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 = -- 2.39.2