From e3a7014b7594e918901d803d9d966af70e8900e0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 28 Jun 2021 21:59:06 +0000 Subject: www: fix manifest.js.gz for default publicInbox.grokManifest ManifestJsGz->response was not invoking the new "url_filter" method properly. Furthermore, fix url_filter for returning 404 responses. Reported-by: Kyle Meyer Link: https://public-inbox.org/meta/87fsx3128a.fsf@kyleam.com/ Fixes: 520be116e8a686cb ("www_listing: start updating for pagination + search") --- lib/PublicInbox/ManifestJsGz.pm | 4 ++-- lib/PublicInbox/WwwListing.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/ManifestJsGz.pm b/lib/PublicInbox/ManifestJsGz.pm index 9dc10791..7fee78dd 100644 --- a/lib/PublicInbox/ManifestJsGz.pm +++ b/lib/PublicInbox/ManifestJsGz.pm @@ -13,11 +13,11 @@ use HTTP::Date qw(time2str); my $json = PublicInbox::Config::json(); -sub url_regexp { +sub url_filter { my ($ctx) = @_; # grokmirror uses relative paths, so it's domain-dependent # SUPER calls PublicInbox::WwwListing::url_filter - ($ctx->url_filter('publicInbox.grokManifest', 'match=domain'))[0]; + $ctx->SUPER::url_filter('publicInbox.grokManifest', 'match=domain'); } sub inject_entry ($$$;$) { diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index 76c76663..98a69986 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -55,7 +55,7 @@ again: } elsif ($v eq 'all') { (qr/./, undef); } elsif ($v eq '404') { - undef; + (undef, undef); } else { warn <