From 679a69acd2633bcaf94add67917bc73e91fa672a Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Fri, 27 Oct 2023 21:18:51 +0200
Subject: [PATCH] privoxy-log-parser: Highlight: 'Couldn't deliver the error
 message for [...]'

---
 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 c2c13fe9..29b8e1e8 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -1964,6 +1964,12 @@ sub handle_loglevel_connect($) {
         $c =~ s@(?<=connected over )(TLSv\d\.\d)@$h{'tls-version'}$1$h{'Standard'}@;
         $c =~ s@(?<=\()([^)]+)@$h{'cipher-suite'}$1$h{'Standard'}@;
 
+    } elsif ($c =~ m/^Couldn't deliver the error message for/) {
+
+        # Couldn't deliver the error message for https://m.media-amazon.com/[...] through client socket 18 using TLS/SSL
+        $c = highlight_matched_url($c, "(?<=error message for )[^ ]*");
+        $c =~ s@(?<=client socket )(\d+)@$h{'Number'}$1$h{'Standard'}@;
+
     } elsif ($c =~ m/^Looks like we / or
              $c =~ m/^Unsetting keep-alive flag/ or
              $c =~ m/^No connections to wait/ or
-- 
2.49.0