From db7c206a4e2c71d08dd286d6dfa92431976e9693 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 9 Dec 2020 23:33:00 +0000 Subject: 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. --- lib/PublicInbox/NNTP.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/NNTP.pm') diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index 0b43cdbc..097fdb84 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -487,8 +487,9 @@ sub set_nntp_headers ($$) { # *something* here is required for leafnode, try to follow # RFC 5536 3.1.5... $hdr->header_set('Path', $server_name . '!not-for-mail'); - - header_append($hdr, 'List-Post', "{-primary_address}>"); + if (my $post_addr = $ibx->{-primary_address}) { + header_append($hdr, 'List-Post', ""); + } if (my $url = $ibx->base_url) { $mid = mid_escape($mid); header_append($hdr, 'Archived-At', "<$url$mid/>"); -- cgit v1.2.3-24-ge0c7