Article View: news.software.nntp
Article #90816Re: More on NNTP testing
From: Doc OLeary
Date: Fri, 29 Sep 2023 22:26
Date: Fri, 29 Sep 2023 22:26
55 lines
3508 bytes
3508 bytes
For your reference, records indicate that Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: > What I'm wondering about, is how the software should behave if the first > line is simply invalid. It is entirely up to you how to architect your software. How you do or don’t abstract away lower levels is always a matter of trade-offs, and they may have a significant impact on how you provide functionality at a higher level. For example, if you want to provide an “offline” mode, something somewhere inside your code needs to make the determination of what can be done in that mode. And that includes what happens if you fail to go “online” for *whatever* reason. It’s not such a problem these days with broadband like it was back in the days of dialup, but it *is* somewhat related to command pipelining, too, so keep that in mind as you make your decisions. For my framework, I made the decision to have different objects for the server and the session/connection to that server. The groups and article objects deal with only servers, and it is up to the servers to manage their connection(s). > Reading RFC 3977, section 3.1, I can get the sense that > > 201This is a valid response line CR LF > > but nobody does it in practice? As Jon said, that’s not strictly valid, but my parser would certainly accept it, because I’m looking for any integer (not just a 3 digit one) and then skipping any amount of whitespace (including none). I obviously disagree with Jon, and I intentionally tried to be more permissive than the standard to future-proof my code to some degree. If you want to write a validating framework, you’re welcome to do so; I just wanted a functional one. > 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? At some level, they just don’t care about any of that. They just want to know what new messages there are, or they just want to post a reply. If it comes back as “0 new messages” or “saved to outgoing messages”, that might be a big deal, and it might not be. In my book, not every transient network error deserves a be a red alert. > How do people using newsreaders want to log such errors, and/or complain > about it? To whom? Different people will care to different degrees. You’ll never be able to please all the people all the time. Generally, people want software that *works*, not error logs that tell them in exquisite detail why it doesn’t. -- "Also . . . I can kill you with my brain." River Tam, Trash, Firefly
Technical Details
Message-ID:
<uf7iuf$fr47$1@dont-email.me>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-mailReferences:
<65SQM.565977$9o89.411905@fx05.ams4>Show Full Headers
Complete Article Headers
Message-ID: <uf7iuf$fr47$1@dont-email.me> Subject: Re: More on NNTP testing Date: Fri, 29 Sep 2023 22:26:23 +0000 From: Doc O'Leary , <droleary.usenet@2023.impossiblystupid.com> 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: Subsume Technologies, Inc. Lines: 56 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 29 Sep 2023 22:26:23 -0000 (UTC) User-Agent: com.subsume.NNTP/1.0.0 Cancel-Lock: sha1:LXvui5ap5IOFjxsThFv+l+jd+3Q=