From c656a3e40efa95089b09b8d531e823f826575c3c Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 13 May 2020 11:53:12 +0200 Subject: [PATCH] Log complete https request lines with LOG_LEVEL_CLF ... at the end of handle_established_connection(). Sponsored by: Robert Klemme --- jcc.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/jcc.c b/jcc.c index feab1acf..7232e7d7 100644 --- a/jcc.c +++ b/jcc.c @@ -3440,9 +3440,19 @@ static void handle_established_connection(struct client_state *csp) } #endif - log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 200 %llu", - csp->ip_addr_str, http->ocmd, csp->content_length); - +#ifdef FEATURE_HTTPS_INSPECTION + if (client_use_ssl(csp)) + { + log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s https://%s%s %s\" 200 %llu", + csp->ip_addr_str, http->gpc, http->hostport, http->path, + http->ver, csp->content_length); + } + else +#endif + { + log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" 200 %llu", + csp->ip_addr_str, http->ocmd, csp->content_length); + } csp->server_connection.timestamp = time(NULL); } -- 2.39.2