]> Sergey Matveev's repositories - public-inbox.git/commitdiff
nntp: add Path: header for leafnode
authorEric Wong <e@80x24.org>
Thu, 13 Jun 2019 06:54:13 +0000 (06:54 +0000)
committerEric Wong <e@80x24.org>
Thu, 13 Jun 2019 06:54:48 +0000 (06:54 +0000)
Apparently leafnode just needs any junk in the Path: header.
Lets not waste bandwidth and just use a single byte to keep
leafnode happy.

Cc: Dave Taht <dave@taht.net>
lib/PublicInbox/NNTP.pm

index be80560ffa4a965a02e597796790ad7082d08f4d..1d07220de1ec977fb30ba296c93a989f8ddafe11 100644 (file)
@@ -434,6 +434,10 @@ sub xref ($$$$) {
 sub set_nntp_headers ($$$$$) {
        my ($self, $hdr, $ng, $n, $mid) = @_;
 
+       # why? leafnode requires a Path: header for some inexplicable
+       # reason.  We'll fake the shortest one possible.
+       $hdr->header_set('Path', 'y');
+
        # clobber some
        my $xref = xref($self, $ng, $n, $mid);
        $hdr->header_set('Xref', $xref);