From: Fabian Keil <fk@fabiankeil.de>
Date: Tue, 9 Jun 2020 08:07:09 +0000 (+0200)
Subject: privoxy-log-parser.pl: Unbreak the gathering of host statistics with http requests
X-Git-Tag: v_3_0_30~279^2
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/static/faq/faq/@default-cgi@send-stylesheet?a=commitdiff_plain;h=2616e38ac513d1e4fc439fbca1197135f69e186b;p=privoxy.git

privoxy-log-parser.pl: Unbreak the gathering of host statistics with http requests

... and CONNECT requests.
---

diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index fb220980..09639938 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -2040,7 +2040,7 @@ sub gather_loglevel_clf_stats($) {
     $stats{'http-version'}{$http_version}++;
 
     if ($cli_options{'host-statistics-threshold'} != 0) {
-        $resource =~ m@(?:http[s]://)([^/]+)/?@;
+        $resource =~ m@(?:https?://)?([^/]+)/?@;
         $stats{'hosts'}{$1}++;
     }
     $stats{'content-size-total'} += $size;