Let LOG_LEVEL_REQUEST log all requests
authorFabian Keil <fk@fabiankeil.de>
Sat, 30 May 2020 08:56:13 +0000 (10:56 +0200)
committerFabian Keil <fk@fabiankeil.de>
Mon, 1 Jun 2020 08:11:46 +0000 (10:11 +0200)
Previously unencrypted requests were only logged
with LOG_LEVEL_REQUEST when they weren't crunched
(in which case they were logged with LOG_LEVEL_CRUNCH).

This was documented behaviour, but logging all requests
seems more useful.

jcc.c

diff --git a/jcc.c b/jcc.c
index 68211c0..2eaf0b7 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -3553,6 +3553,17 @@ 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);
@@ -3676,17 +3687,6 @@ static void chat(struct client_state *csp)
    }
 
    log_applied_actions(csp->action);
-#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 (fwd->forward_host)
    {
       log_error(LOG_LEVEL_CONNECT, "via [%s]:%d to: %s",