From: Fabian Keil <fk@fabiankeil.de>
Date: Fri, 15 May 2020 10:52:30 +0000 (+0200)
Subject: send_crunch_response(): Log the whole URL for inspected https requests
X-Git-Tag: v_3_0_29~419
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/@default-cgi@toggle?a=commitdiff_plain;h=14ef58cc78259adaf8d8f06434937baa2004b823;p=privoxy.git

send_crunch_response(): Log the whole URL for inspected https requests

Sponsored by: Robert Klemme
---

diff --git a/jcc.c b/jcc.c
index 7232e7d7..56c617be 100644
--- a/jcc.c
+++ b/jcc.c
@@ -848,10 +848,22 @@ static void send_crunch_response(struct client_state *csp, struct http_response
 
       /* Log that the request was crunched and why. */
       log_applied_actions(csp->action);
-      log_error(LOG_LEVEL_CRUNCH, "%s: %s", crunch_reason(rsp), http->url);
-      log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" %s %u",
-         csp->ip_addr_str, http->ocmd, status_code, rsp->content_length);
-
+#ifdef FEATURE_HTTPS_INSPECTION
+      if (client_use_ssl(csp))
+      {
+         log_error(LOG_LEVEL_CRUNCH, "%s: https://%s%s", crunch_reason(rsp),
+            http->hostport, http->path);
+         log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s https://%s%s %s\" %s %llu",
+            csp->ip_addr_str, http->gpc, http->hostport, http->path,
+            http->ver, status_code, rsp->content_length);
+      }
+      else
+#endif
+      {
+         log_error(LOG_LEVEL_CRUNCH, "%s: %s", crunch_reason(rsp), http->url);
+         log_error(LOG_LEVEL_CLF, "%s - - [%T] \"%s\" %s %u",
+            csp->ip_addr_str, http->ocmd, status_code, rsp->content_length);
+      }
       /* Write the answer to the client */
 #ifdef FEATURE_HTTPS_INSPECTION
       if (client_use_ssl(csp))