Don't log the applied actions in process_encrypted_request()
authorFabian Keil <fk@fabiankeil.de>
Sun, 14 Mar 2021 16:17:26 +0000 (17:17 +0100)
committerFabian Keil <fk@fabiankeil.de>
Sun, 21 Mar 2021 06:58:53 +0000 (07:58 +0100)
Log them in continue_https_chat() instead to mirror chat().

Prevents the applied actions from getting logged twice
for the first request on an https-inspected connection.

jcc.c

diff --git a/jcc.c b/jcc.c
index aec8e2a..20df6df 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -2871,7 +2871,6 @@ 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_REQUEST, "https://%s%s", csp->http->hostport,
       csp->http->path);
 
@@ -2977,6 +2976,8 @@ static void continue_https_chat(struct client_state *csp)
       return;
    }
 
+   log_applied_actions(csp->action);
+
    log_error(LOG_LEVEL_CONNECT,
       "Reusing server socket %d connected to %s. Requests already sent: %u.",
       csp->server_connection.sfd, csp->server_connection.host,