From 74ed6c9d40b76bc9c9c00946d266dfbc400884c4 Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 26 Dec 2020 13:33:10 +0100
Subject: [PATCH] privoxy-log-parser: Highlight 'Rewrite detected: ...'
 messages again

---
 tools/privoxy-log-parser.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index 5bc6d792..7623100b 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -1305,6 +1305,12 @@ sub handle_loglevel_redirect($) {
         # Percent-encoding redirect URL: http://www.example.org/\x02
         $c = highlight_matched_url($c, '(?<=redirect URL: ).*');
 
+    } elsif ($c =~ m/^Rewrite detected:/) {
+
+        # Rewrite detected: GET http://10.0.0.2:88/blah.txt HTTP/1.1
+        # Rewrite detected: GET https://www.electrobsd.org/CommonJS/ajax/libs/jquery/3.4.1/jquery.min.js HTTP/1.1
+        $c = highlight_matched_request_line($c, '(?<=^Rewrite detected: ).*');
+
     } else {
 
         found_unknown_content($c);
-- 
2.49.0