summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--foostats.pl6
-rw-r--r--t/tmp_filter_log6
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...