From 7a92c24157953dc6d9fad911b955c8691cdfcad9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 21 Dec 2020 19:41:21 +0000 Subject: manifest.js.gz: fix per-inbox /$INBOX/manifest.js.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) --- lib/PublicInbox/ManifestJsGz.pm | 6 ++++++ lib/PublicInbox/WWW.pm | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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 { -- cgit v1.2.3-24-ge0c7