πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87428

Re: Multiple occurences of header fields

#87428
From: dunno
Date: Tue, 10 May 2016 06:32
76 lines
3826 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> wrote:
> dunno,
> 
>> That is my understanding of RFC: unless multiple occurrences of header
>> field are explicitly prohibited, they are allowed and therefore should be
>> preserved in injected article. However, it seems that nnrpd is stripping
>> every occurrence of header field except the last one. Am I missing
>> something?
> 
> Please give an example, and the version of INN you are using.
> 
> Just tested with INN 2.6.0, and it works as expected:
> 
> POST
> 340 Ok, recommended message-ID <ngqp7i$59g$1@news.trigofacile.com>
> From: =?ISO-8859-15?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> Newsgroups: fr.test
> Subject: Duplications
> Date: Mon, 09 May 2016 21:19:01 +0200 (CEST)
> Comments: Comment 1
> X-Test-Multiple: 1
> Comments: Comment 2
> X-Test-Multiple: 2
> X-Test-Multiple: And 3
> 
> plop
> .
> 240 Article received <ngqp7i$59g$1@news.trigofacile.com>
> ARTICLE <ngqp7i$59g$1@news.trigofacile.com>
> 220 0 <ngqp7i$59g$1@news.trigofacile.com> article
> Path: news.trigofacile.com!.POSTED.news.trigofacile.com!not-for-mail
> From: =?ISO-8859-15?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> Newsgroups: fr.test
> Subject: Duplications
> Date: Mon, 09 May 2016 21:19:01 +0200 (CEST)
> Organization: Groupes francophones par TrigoFACILE
> Message-ID: <ngqp7i$59g$1@news.trigofacile.com>
> Injection-Date: Mon, 9 May 2016 19:42:48 -0000 (UTC)
> Injection-Info: news.trigofacile.com; posting-account="<localhost>";
> posting-host="news.trigofacile.com:2001:41d0:1:6d44::1";
> 	logging-data="5424"; mail-complaints-to="abuse@trigofacile.com"
> Comments: Comment 1
> X-Test-Multiple: 1
> Comments: Comment 2
> X-Test-Multiple: 2
> X-Test-Multiple: And 3
> Xref: news.trigofacile.com fr.test:36877
> 
> plop
> .
> 
> 
> 
> nnrpd did not strip anything.
> 
> 
> 
>> Is there any specific reason for that? I can tell that innd
>> allows multiple occurrences because I see multiple X-Abuse-And-DMCA-Info:
>> headers in articles propagated from Giganews.
> 
> And so does nnrpd.
> 

I found where the problem is. It's in nnrpd Perl filter, documented in
~/doc/hook-perl. It actually mentioned in documentation. Instead of using
hash of arrays of strings, like I do, it uses hash of strings, so it cannot
support multiple occurrences of any header fields. Except that it treat
"Comments:" and "comments:" as different headers, lol. 

Same with innd Perl filter, but it does not modify the headers.

-- 
dunno

Technical Details
Message-ID: <1847732562.484552918.438596.dunno-dunno.dunno@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <2116899503.484444288.248931.dunno-dunno.dunno@news.mixmin.net> <ngqpe2$5cc$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <1847732562.484552918.438596.dunno-dunno.dunno@news.mixmin.net>
Subject: Re: Multiple occurences of header fields
Date: Tue, 10 May 2016 06:32:13 +0000
From: dunno <dunno@dunno.dunno>
References: <2116899503.484444288.248931.dunno-dunno.dunno@news.mixmin.net> <ngqpe2$5cc$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
X-Received: by 10.129.46.67 with SMTP id u64mr25705998ywu.31.1462861933867;
Newsgroups: news.software.nntp
Organization: dunno
Mime-Version: 1.0
Injection-Date: Tue, 10 May 2016 06:32:13 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="4e7a44860d6d82d8210718509a802021cc10a18d";
 logging-data="4930"; mail-complaints-to="abuse@mixmin.net"
User-Agent: NewsTap/5.1.8 (iPhone/iPod Touch)
Cancel-Lock: sha1:jkK4O/TIVRHTbZC/7UZXz4v6yfU=
X-Face: +Y@4$e3-8y^:[5%r>Y6xxT0FVGRQ%3F"zg9+i6@7@t0}rtq3S8)2":;YgvZ5~2cI}rUZ$X$ sYT%EO6}l1DF*"<0$clFtjHZYnH:ZAf3ShT.Ovq
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Received-Body-CRC: 531367098
X-Received-Bytes: 3852