]> Sergey Matveev's repositories - public-inbox.git/commitdiff
manifest.js.gz: fix per-inbox /$INBOX/manifest.js.gz
authorEric Wong <e@80x24.org>
Mon, 21 Dec 2020 19:41:21 +0000 (19:41 +0000)
committerEric Wong <e@80x24.org>
Sat, 26 Dec 2020 20:19:22 +0000 (20:19 +0000)
/$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
lib/PublicInbox/WWW.pm

index f98d9d010925dcf1a6d6a1ff8fca89f7ad65eec5..74820fb5d322da0fb8abb3a05ac374113dd5ac08 100644 (file)
@@ -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;
index e3b589cb78d4475c39eba9d8ca6c6f8e89e9610d..37f55347ac45d8d5e9ff57b0deb22771db7be789 100644 (file)
@@ -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 {