πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87430

Re: Multiple occurences of header fields

#87430
From: dunno
Date: Wed, 11 May 2016 01:48
61 lines
3907 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> wrote:
> dunno,
> 
>> 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.
> 
> Changing the use of strings to hashes of strings would unfortunately 
> break existing nnrpd Perl filters, so it is not something I am inclined 
> to do (unless introducing a new %hdrfull hash with that behaviour for 
> instance).

I would suggest to introduce new %header hash, and declare %hdr as obsolete
in documentation, leaving it for backward compatibility. I see why rapid
changes are not welcomed, but it does not mean that software don't have to
evolve.

>> Except that it treat
>> "Comments:" and "comments:" as different headers, lol.
> 
> It may be something to fix, as hash keys are case-sensitive for Perl.
> A suggestion would be to somehow normalize the name of the header 
> (capitalize the initial character and any character following a char 
> different from [a-zA-Z]? -> "X-Trace" for instance).
> Does it sound the right thing to do?

It seems that INN is already normalizing the names of some headers (for
example, "newsgroups:" is converted to "Newsgroups:" in injected articles.)

I understand  some software (such as custom scripts) might be unaware of
the fact that headers' names are case-insensitive, so it might explicitly
look for header name "Message-ID", thus missing the "message-id". However,
I'm not sure if any server software or newsreader would do that. Would
there be any considerable effect on the network if all headers were lower
case?

> By the way, I see in RFC 5322 that a field name consists of:
> 
>    ftext           =   %d33-57 /          ; Printable US-ASCII
>                        %d59-126           ;  characters not including
>                                           ;  ":".
> 
> So basically "X-#%-T`!" is a valid header field name.
> Has anyone here already tried to send articles with that unusual syntax?

I just tried to send such article to mixmin.net and it didn't work. I'm
away from my computer, so I cannot test it on my installation of INN.

> 
>> Same with innd Perl filter, but it does not modify the headers.
> 
> And I think innd Perl filter won't give you two answers for "Comments:" 
> and "comments:", but only the contents of the first occurrence, will it?

I assume so; unfortunately, cannot test it at the moment.

-- 
dunno

Technical Details
Message-ID: <789392936.484620702.497014.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> <1847732562.484552918.438596.dunno-dunno.dunno@news.mixmin.net> <ngtd3e$2e5$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <789392936.484620702.497014.dunno-dunno.dunno@news.mixmin.net>
Subject: Re: Multiple occurences of header fields
Date: Wed, 11 May 2016 01:48:35 +0000
From: dunno <dunno@dunno.dunno>
References: <2116899503.484444288.248931.dunno-dunno.dunno@news.mixmin.net> <ngqpe2$5cc$1@news.trigofacile.com> <1847732562.484552918.438596.dunno-dunno.dunno@news.mixmin.net> <ngtd3e$2e5$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
Newsgroups: news.software.nntp
Organization: dunno
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 11 May 2016 01:48:35 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="1fd735318d3315a0d2a9d237f23ae3ef84ba3f3d";
 logging-data="20951"; mail-complaints-to="abuse@mixmin.net"
User-Agent: NewsTap/5.1.8 (iPhone/iPod Touch)
Cancel-Lock: sha1:uvKIf3iTAqTEnHzg7s/Pn88UnIQ=
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
X-Received-Body-CRC: 1069917256
X-Received-Bytes: 3773