privoxy-log-parser.pl: Unbreak the gathering of host statistics with http requests
authorFabian Keil <fk@fabiankeil.de>
Tue, 9 Jun 2020 08:07:09 +0000 (10:07 +0200)
committerFabian Keil <fk@fabiankeil.de>
Tue, 9 Jun 2020 09:20:12 +0000 (11:20 +0200)
... and CONNECT requests.

tools/privoxy-log-parser.pl

index fb22098..0963993 100755 (executable)
@@ -2040,7 +2040,7 @@ sub gather_loglevel_clf_stats($) {
     $stats{'http-version'}{$http_version}++;
 
     if ($cli_options{'host-statistics-threshold'} != 0) {
     $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;
         $stats{'hosts'}{$1}++;
     }
     $stats{'content-size-total'} += $size;