Article View: news.software.nntp
Article #37538Re: nntp client - method question
From: Fred J. LeFevre
Date: Tue, 18 May 1999 00:00
Date: Tue, 18 May 1999 00:00
79 lines
4187 bytes
4187 bytes
In article <gergFBxvKq.81t@netcom.com>, gerg@netcom.com says... > >fjfevre@ibm.net (Fred J. LeFevre) writes: >> >>I guess I was fixating on the sentence in 2.4.2, "In addition, below is >>listed a general set of response codes that may be received at any time.". >> > >Are you paraphrasing the RFC's real wording? My copy of the RFC doesn't >say that. Section 2.4.2 says: > > 2.4.2. Status Responses > > These are status reports from the server and indicate the response to > the last command received from the client. > > Status response lines begin with a 3 digit numeric code which is > sufficient to distinguish all responses. Some of these may herald > the subsequent transmission of text. > > Yes, I am paraphrasing the RFC's exact, real wording. If you'll look a few paragraphs down from that which you sited above, you'll see a paragraph that begins "The exact response codes that should be expected...". The last sentence in that paragraph is the one I've quoted. When it says "...below is listed a general set of response codes that may be received at any time.", I can only think it's refering to the very next section, 2.4.3 General Responses. >The section that talks about general responses is 2.4.3, which doesn't >say they'll be received "at any time". It says they'll be received >as the result of certain events: > > 2.4.3. General Responses > > The following is a list of general response codes that may be sent by > the NNTP server. These are not specific to any one command, but may > be returned as the result of a connection, a failure, or some unusual > condition. > See my comments above. I believe the RFC does say these responses "may be received at any time". > >> >>Can a client make the assumption that the server will end textual >>response via the single line containing only a period before sending >>one of these section 2.4.3 General Responses such as '400 service >>discontinued'? >> > >No, the reverse of that. The one-line response with the 3-digit code >and english description of the response will come first. The subsequent >lines of multi-line responses will come after that first line. > >It's been a few years since I dug into the RFC deeply, but my recollection >is that the response to any command will be a single line containing the >3-digit response code. If the code is a 3xx, 4xx, or 5xx code, that one >line is all you'll get. If you get a 2xx code and the command produces >a multi-line response, then you'll get the rest of the lines until the >end line (.). > It might be helpful to point out that the RFC gives a specific example in section 4.5 Example 5 - interruption due to operator request. You'll note that this example shows the server terminating textual responses prematurely via sending ".", then gives the 400 status response. My question specifically is whether the client can depend on this behavior from the server. The RFC doesn't seem to mandate that behavior, but it sure seems like the best approach. -- ------------------------------------------------------------------------ Fred J. LeFevre FJFevre@IBM.net 6307 Hammel Avenue (513) 631-7881 Cincinnati, Ohio 45237-4905
Technical Details
Message-ID:
<3741de61@news3.us.ibm.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.mbox.zip!not-for-mailReferences:
<37404133@news3.us.ibm.net> <7hpipj$igb$1@shell1.ncal.verio.com> <37409af9@news3.us.ibm.net> <gergFBxvKq.81t@netcom.com>Show Full Headers
Complete Article Headers
Message-ID: <3741de61@news3.us.ibm.net> Subject: Re: nntp client - method question Date: Tue, 18 May 1999 00:00:00 +0000 From: fjfevre@ibm.net (Fred J. LeFevre) References: <37404133@news3.us.ibm.net> <7hpipj$igb$1@shell1.ncal.verio.com> <37409af9@news3.us.ibm.net> <gergFBxvKq.81t@netcom.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: 478861747 X-Notice: should be reported to postmaster@ibm.net Content-Type: Text/Plain; charset=US-ASCII X-Complaints-To: postmaster@ibm.net X-Trace: 18 May 1999 21:40:49 GMT, 129.37.214.162 Organization: Channel Firm, Inc. MIME-Version: 1.0 Newsgroups: news.software.nntp