Article View: news.software.nntp
Article #44520Re: [NNTP Draft] 4. Basic Operation
From: Andrew Gierth
Date: Sun, 27 Feb 2000 00:00
Date: Sun, 27 Feb 2000 00:00
132 lines
6621 bytes
6621 bytes
>>>>> "Curt" == Curt Welch <curt@kcwc.com> writes: >> 4. Basic Operation. >> Command lines MUST NOT exceed 512 octets, which includes the >> terminating US-ASCII CRLF pair. Arguments MUST NOT exceed 497 >> octets. Curt> I've seen Message-IDs defined to be a max of 512 octets. Where? USEFOR doesn't give a limit, though I think it probably should. Curt> How then is NNTP supposed to implement a "ARTICLE <MID>" Curt> command if the max command length is limited to 512? MIDs should not ever be that long. Personally I restrict 'em by enforcing the NNTP command length limit strictly. (Helps to avoid buffer overrun issues, too.) Curt> Why not just rase this to something more resonable like 1000? Because that would be a gratuitous incompatibility with RFC 977? >> A NNTP server MAY have an inactivity autologout timer. Such a >> timer MUST be of at least three minutes duration. The >> receipt of any command from the client during that interval >> should suffice to reset the autologout timer. When the timer >> expires, the server should close the TCP connection without >> sending any response to the client. Curt> This is a change from past implementations which dumped a 503 Curt> timeout message into the stream before closing it. I believe the clarification is intentional. Sending an out-of-sequence response is not, IMO, appropriate. Curt> But, because this used to be common practice, I think it should Curt> be mentioned in the RFC to assist people writing clients. You mean that the RFC should state that sending a response before closing was common, but is now forbidden? I guess a compatibility note of some sort might be in order. >> keyword that is the first part of the command. In addition, >> below is listed a general set of response codes that MAY be >> received at any time. Curt> I don't really understand where there list is? Nor does anyone else, apparently. >> The use of unspecified response codes for a standard command is >> prohibited. Curt> I think this is a problem because when you write a server, you Curt> will always find error conditions that are unique to your Curt> impelementation. And most commands don't have a generic "other Curt> error" code defined. So you end up either sending a code not Curt> defined for the command, in direct violation to the above, or Curt> you use one of the other codes that seems to be a "close" fit. Curt> But by overloading the code, you make it impossible for a Curt> client to tell the difference between the errors. Or worse, Curt> the client mis-interprets the meaning of the error and does Curt> something stupid. The PAT example could be considered to fall into this category. >> The status indicator pattern x9x is provided for debugging. >> Since much debugging output may be classed as "informative >> messages", it MUST be the case that responses 190 through 199 >> WILL be used for various debugging outputs. There is no >> requirement in this specification for debugging output. >> However, if such is provided over the connected stream, it >> MUST use these response codes. If appropriate to a specific >> implementation, other x9x codes MAY be used for debugging. >> (For example, response code 290 could be used to acknowledge >> a remote debugging request.) Curt> What's the point of this x9x stuff? Is it trying to say that a Curt> client may see random extra unexpected lines with x9x codes and Curt> that they should be ignored as if they weren't there? (almost Curt> as if they were comments?) Curt> Or is it saying that any command might return a x9x code Curt> instead of one of the expected codes? Curt> Or is it only saying that if you add private debugging Curt> commands, that their responses must be from the x9x set. And Curt> if that's the point, what's the difference between a private Curt> extension (x8x) and a debugging command? And since all this Curt> has no bearing whatsoever on makeing "real" clients work, why Curt> does the RFC go to all this trouble to define the x8x and x9x Curt> codes? Good question. This has already been brought up on the list, as far as I know the x8x and x9x codes have never been defended other than by reference to the fact that RFC 977 defined them that way (and was equally ambiguous about them, in fact the paragraph in question is straight from 977). Personally I don't see any reasonable way to resolve this other than to remove the special meanings of x8x and x9x completely; x8x is needed for authentication anyway, and x9x could simply be reassigned as 'reserved'. >> A server MUST respond to an unrecognized, unimplemented, or >> syntactically invalid command with a negative response >> code(status indicators of the form 5XX). A server MUST >> respond to a command issued when the session is in an >> incorrect state by responding with a negative status >> indicator. This may be from either the 4XX or 5XX group as >> appropriate. Curt> Are these codes that can be received at any time? i.e. is it Curt> OK to send any 4xx or 5xx code as a response to any command? Curt> I think it would probably be wise to more precisely define what Curt> a server MUST return for a few cases like "command unknown". Curt> Or "Other error". Or at least talk a little more about how to Curt> correctly pick codes. RFC 977 had this a little bit better, I think. A list of error codes, as 977 has, would probably help to clarify things a great deal, and expose some inconsistencies in the draft (such as the misuse of 500 in a few places). -- Andrew.
Technical Details
Message-ID:
<877lfrbhub.fsf@erlenstar.demon.co.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<87u2ivd36l.fsf@erlenstar.demon.co.uk> <20000226190559.229$6S@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <877lfrbhub.fsf@erlenstar.demon.co.uk> Subject: Re: [NNTP Draft] 4. Basic Operation Date: Sun, 27 Feb 2000 00:00:00 +0000 From: Andrew Gierth <andrew@erlenstar.demon.co.uk> References: <87u2ivd36l.fsf@erlenstar.demon.co.uk> <20000226190559.229$6S@newsreader.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.mbox.zip!not-for-mail X-Deja-AN: 590438938 X-Mayan-Date: Long count = 12.19.6.17.17; tzolkin = 1 Caban; haab = 5 Kayab X-Complaints-To: andrew@erlenstar.demon.co.uk Organization: disorganised X-Attribution: AG X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29 X-P-Persistent-Headers: are a bad idea. Newsgroups: news.software.nntp X-Post-Filter: postfilter v0.6 alpha