From 2237f95acbc2d078808269eeb77c02aca29a3cfa Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 26 Sep 2025 08:03:59 +0300 Subject: fix --- foostats.pl | 6 +----- t/tmp_filter_log | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/foostats.pl b/foostats.pl index b8b6ffe..0c6e652 100644 --- a/foostats.pl +++ b/foostats.pl @@ -1058,15 +1058,11 @@ package Foostats::Reporter { # host[/path] if ($t =~ m{^([A-Za-z0-9.-]+\.[A-Za-z]{2,})(/[^\s<]*)?$}) { my ($host, $path) = ($1, $2 // ''); - my $has_ellipsis = index($t, '...') != -1 || index(($path // ''), '...') != -1; my $is_gemini = defined($path) && $path =~ /\.gmi(?:[?#].*)?$/i; my $scheme = 'https'; # If truncated, fall back to host root - my $href = - $has_ellipsis - ? sprintf('%s://%s/', $scheme, $host) - : sprintf('%s://%s%s', $scheme, $host, ($path eq '' ? '/' : $path)); + my $href = sprintf('%s://%s%s', $scheme, $host, ($path eq '' ? '/' : $path)); return ($href . $trail); } diff --git a/t/tmp_filter_log b/t/tmp_filter_log index b07d7b8..d18c32b 100644 --- a/t/tmp_filter_log +++ b/t/tmp_filter_log @@ -140,3 +140,9 @@ OK: /gemfeed/index.gmi appears fine... OK: /index.html appears fine... OK: /index.html appears fine... WARN: same blocked due to excessive requesting... +OK: /gemfeed/atom.xml appears fine... +OK: /gemfeed/ appears fine... +OK: /gemfeed/index.gmi appears fine... +OK: /index.html appears fine... +OK: /index.html appears fine... +WARN: same blocked due to excessive requesting... -- cgit v1.2.3