From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.taht.net (mail.taht.net [IPv6:2a01:7e00::f03c:91ff:feae:7028]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5F78F1F609 for ; Thu, 13 Jun 2019 17:53:43 +0000 (UTC) Received: from dancer.taht.net (unknown [IPv6:2603:3024:1536:86f0:eea8:6bff:fefe:9a2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.taht.net (Postfix) with ESMTPSA id 112ED1F40B; Thu, 13 Jun 2019 17:53:40 +0000 (UTC) From: Dave Taht To: Eric Wong Cc: meta@public-inbox.org Subject: Re: [PATCH] nntp: add Path: header for leafnode References: <20190613065413.4705-1-e@80x24.org> Date: Thu, 13 Jun 2019 10:53:28 -0700 In-Reply-To: <20190613065413.4705-1-e@80x24.org> (Eric Wong's message of "Thu, 13 Jun 2019 06:54:13 +0000") Message-ID: <87h88tmkx3.fsf@taht.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: Eric Wong writes: > 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 Thx! awesome! > --- > lib/PublicInbox/NNTP.pm | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm > index 85778c4..5615cd7 100644 > --- a/lib/PublicInbox/NNTP.pm > +++ b/lib/PublicInbox/NNTP.pm > @@ -435,6 +435,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);