]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwListing.pm
treewide: update to v3 Tor onions
[public-inbox.git] / lib / PublicInbox / WwwListing.pm
index fce0e530b24feb91393951cf24223c99ffb4c115..f28eddf1abb7bb8c9d39410a2bce5e0d12fae011 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # Provide an HTTP-accessible listing of inboxes.
@@ -9,6 +9,7 @@ use PublicInbox::Hval qw(prurl fmt_ts);
 use PublicInbox::Linkify;
 use PublicInbox::GzipFilter qw(gzf_maybe);
 use PublicInbox::ConfigIter;
+use PublicInbox::WwwStream;
 use bytes (); # bytes::length
 
 sub ibx_entry {
@@ -69,6 +70,9 @@ sub hide_key { 'www' }
 sub response {
        my ($class, $ctx) = @_;
        bless $ctx, $class;
+       if (my $ALL = $ctx->{www}->{pi_cfg}->ALL) {
+               $ALL->misc->reopen;
+       }
        my $re = $ctx->url_regexp or return $ctx->psgi_triple;
        my $iter = PublicInbox::ConfigIter->new($ctx->{www}->{pi_cfg},
                                                \&list_match_i, $re, $ctx);