From 8f3bbc38ceff01be927e943ad4814a68835b29c4 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 15 May 2020 20:08:19 +0200 Subject: [PATCH] When https inspecting, log the request later on ... once we have gathered the path. Include the protocol to differentiate the log messages from those for plain http (which currently don't include the protocol). Sponsored by: Robert Klemme --- jcc.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/jcc.c b/jcc.c index 56c617be..61426bcb 100644 --- a/jcc.c +++ b/jcc.c @@ -2396,6 +2396,8 @@ static jb_err process_encrypted_request(struct client_state *csp) log_error(LOG_LEVEL_HEADER, "Encrypted request processed"); log_applied_actions(csp->action); + log_error(LOG_LEVEL_GPC, "https://%s%s", csp->http->hostport, + csp->http->path); return err; @@ -3635,8 +3637,17 @@ static void chat(struct client_state *csp) } log_applied_actions(csp->action); - log_error(LOG_LEVEL_GPC, "%s%s", http->hostport, http->path); - +#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_GPC, "%s%s", http->hostport, http->path); + } if (fwd->forward_host) { log_error(LOG_LEVEL_CONNECT, "via [%s]:%d to: %s", -- 2.39.2