For your reference, records indicate that
Johann 'Myrkraverk' Oskarsson <
[email protected]d> 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
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)