* [PATCH] manifest.js.gz: fix per-inbox /$INBOX/manifest.js.gz
@ 2020-12-21 19:41 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-12-21 19:41 UTC (permalink / raw)
To: meta
/$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")
---
lib/PublicInbox/ManifestJsGz.pm | 7 +++++++
lib/PublicInbox/WWW.pm | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/ManifestJsGz.pm b/lib/PublicInbox/ManifestJsGz.pm
index 6d5b57ee..e02450fa 100644
--- a/lib/PublicInbox/ManifestJsGz.pm
+++ b/lib/PublicInbox/ManifestJsGz.pm
@@ -99,4 +99,11 @@ sub psgi_triple {
'Content-Length', bytes::length($out) ], [ $out ] ]
}
+sub per_inbox {
+ my ($ctx) = @_;
+ # only one inbox, slow is probably OK
+ slow_manifest_add($ctx, $ctx->{ibx});
+ psgi_triple($ctx);
+}
+
1;
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index a33d25ab..52630ae3 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 {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-21 19:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 19:41 [PATCH] manifest.js.gz: fix per-inbox /$INBOX/manifest.js.gz Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).