From aca2d958e5bf80d19d69f66d2c1ec6809fece29a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 13 Jul 2019 21:38:11 +0000 Subject: nntp: fix LIST OVERVIEW.FMT ordering and format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RFC3977 8.4.2 mandates the order of non-standard headers to be after the first seven standard headers/metadata; so "Xref:" must appear after "Lines:"|":lines". Additionally, non-required header names must be followed by ":full". Cc: Jonathan Corbet Reported-by: Urs Janßen --- t/nntpd.t | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 't') diff --git a/t/nntpd.t b/t/nntpd.t index e264fa6b..bebecc69 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -101,6 +101,12 @@ EOF is_deeply([$n->group($group)], [ qw(0 1 1), $group ], 'GROUP works'); is_deeply($n->listgroup($group), [1], 'listgroup OK'); + { + my $expect = [ qw(Subject: From: Date: Message-ID: + References: Bytes: Lines: Xref:full) ]; + is_deeply($n->overview_fmt, $expect, + 'RFC3977 8.4.2 compliant LIST OVERVIEW.FMT'); + } SKIP: { $n->can('starttls') or skip('Net::NNTP too old to support STARTTLS', 2); -- cgit v1.2.3-24-ge0c7