about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-06-28 21:59:06 +0000
committerEric Wong <e@80x24.org>2021-06-29 02:47:25 +0000
commite3a7014b7594e918901d803d9d966af70e8900e0 (patch)
tree4ba159b9247b086a02433348ea03fe8083438cd0 /lib
parent991731f1084b99230d1f2a1f2bb8ce7c69bc252b (diff)
downloadpublic-inbox-e3a7014b7594e918901d803d9d966af70e8900e0.tar.gz
ManifestJsGz->response was not invoking the new "url_filter"
method properly.  Furthermore, fix url_filter for returning 404
responses.

Reported-by: Kyle Meyer <kyle@kyleam.com>
Link: https://public-inbox.org/meta/87fsx3128a.fsf@kyleam.com/
Fixes: 520be116e8a686cb ("www_listing: start updating for pagination + search")
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/ManifestJsGz.pm4
-rw-r--r--lib/PublicInbox/WwwListing.pm2
2 files changed, 3 insertions, 3 deletions
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 <<EOF;
 `$v' is not a valid value for `$key'