🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90813

Re: More on NNTP testing

#90813
From: Jon Ribbens
Date: Wed, 27 Sep 2023 11:36
30 lines
2062 bytes
On 2023-09-27, Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:
> So testing things that work is easy.  What I'm more concerned with,
> right now, is the negative testing: testing the things that shouldn't
> work.  [Something that most programmers forget to do.]
>
> So, I can trivially create /an NNTP server/ that replies with the wrong
> greeting line, or perhaps no line at all.

Throw an error. The Robustness Principle is wrong. Do not be "liberal
in what you accept" - that way lies madness.

> Reading RFC 3977, section 3.1, I can get the sense that
>
>    201This is a valid response line CR LF

No. Section 3.2: Arguments MUST be separated from the numeric status
indicator and from each other by a single space."

> It's easy to create these examples, and then have an NNTP library return
> or throw an error (yes, even in C; we just use longjmp()), but how would
> end user software want to deal with such cases?
>
> How do people using newsreaders want to log such errors, and/or complain
> about it?  To whom?

My personal recommendation is to show a human-friendly error whenever
you can, but there absolutely must be a way for the user to press a
button or something to see the raw network data (and bear in mind the
possibility of binary data) so that they can give helpful diagnostic
information to the server operator if necessary.
Technical Details
Message-ID: <slrnuh84um.78e.jon+usenet@raven.unequivocal.eu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <65SQM.565977$9o89.411905@fx05.ams4>

Show Full Headers
Complete Article Headers
Message-ID: <slrnuh84um.78e.jon+usenet@raven.unequivocal.eu>
Subject: Re: More on NNTP testing
Date: Wed, 27 Sep 2023 11:36:54 +0000
From: Jon Ribbens <jon+usenet@unequivocal.eu>
References: <65SQM.565977$9o89.411905@fx05.ams4>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: A noiseless patient Spider
Lines: 30
Injection-Date: Wed, 27 Sep 2023 11:36:54 -0000 (UTC)
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:vy/vrzbxCM5u/Bx3kjHVirhMxak=