about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-21 19:41:21 +0000
committerEric Wong <e@80x24.org>2020-12-26 20:19:22 +0000
commit7a92c24157953dc6d9fad911b955c8691cdfcad9 (patch)
tree7796fdba997d94e83b6964192e87664fb4f28521
parent78e81ae914ad24dfdbce8f7fb98d4c8979743c77 (diff)
downloadpublic-inbox-7a92c24157953dc6d9fad911b955c8691cdfcad9.tar.gz
/$INBOX/manifest.js.gz should not attempt to match every inbox
in the domain (or every inbox); that is for /manifest.js.gz
(without a /$INBOX prefix).

Fixes: f303b4add8ea1883 ("wwwlisting: avoid hogging event loop")
(cherry picked from commit 3ce4c38119f13d419bb865a0aa9b66feff339308)
-rw-r--r--lib/PublicInbox/ManifestJsGz.pm6
-rw-r--r--lib/PublicInbox/WWW.pm2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/PublicInbox/ManifestJsGz.pm b/lib/PublicInbox/ManifestJsGz.pm
index f98d9d01..74820fb5 100644
--- a/lib/PublicInbox/ManifestJsGz.pm
+++ b/lib/PublicInbox/ManifestJsGz.pm
@@ -132,4 +132,10 @@ sub psgi_triple {
                  'Content-Length', bytes::length($out) ], [ $out ] ]
 }
 
+sub per_inbox {
+        my ($ctx) = @_;
+        ibx_entry($ctx, $ctx->{-inbox});
+        psgi_triple($ctx);
+}
+
 1;
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index e3b589cb..37f55347 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -505,7 +505,7 @@ sub get_inbox_manifest ($$$) {
         my $r404 = invalid_inbox($ctx, $inbox);
         return $r404 if $r404;
         require PublicInbox::ManifestJsGz;
-        PublicInbox::ManifestJsGz->response($ctx);
+        PublicInbox::ManifestJsGz::per_inbox($ctx);
 }
 
 sub get_attach {