diff options
author | Eric Wong <e@80x24.org> | 2020-12-09 23:33:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-10 06:39:29 +0000 |
commit | db7c206a4e2c71d08dd286d6dfa92431976e9693 (patch) | |
tree | a9f044f2d7e77afd8cd5ab55bfe429fde7c371f9 /lib/PublicInbox/WwwStream.pm | |
parent | 443ab96a3b329556e26a57b02c7383d5faf536b3 (diff) | |
download | public-inbox-db7c206a4e2c71d08dd286d6dfa92431976e9693.tar.gz |
www+nntp: deal with lack of addresses for ->ALL
Since extindex is an amalgamation of several inboxes, discerning an appropriate address for List-Post: would be expensive and most likely unnecessary. Some legacy/historical inboxes may have no active address, either, so don't attempt to set the List-Post header if no addresses are configured.
Diffstat (limited to 'lib/PublicInbox/WwwStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwStream.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 34e12435..66e34a12 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -143,10 +143,10 @@ EOF } $urls .= "\n" . join('', map { "\tgit clone --mirror $_\n" } @urls); - my $addrs = $ibx->{address}; - $addrs = join(' ', @$addrs) if ref($addrs) eq 'ARRAY'; - my $v = defined $max ? '-V2' : '-V1'; - $urls .= <<EOF; + if (my $addrs = $ibx->{address}) { + $addrs = join(' ', @$addrs) if ref($addrs) eq 'ARRAY'; + my $v = defined $max ? '-V2' : '-V1'; + $urls .= <<EOF; # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: @@ -154,6 +154,7 @@ EOF $addrs public-inbox-index $dir EOF + } my $cfg_link = ($ctx->{-upfx} // '').'_/text/config/raw'; $urls .= <<EOF; |