Article View: news.software.nntp
Article #44472[NNTP Draft] 8. The CAPABILITIES DISCOVERY Step
From: Andrew Gierth
Date: Sat, 26 Feb 2000 00:00
Date: Sat, 26 Feb 2000 00:00
184 lines
9614 bytes
9614 bytes
[This is one of a series of extracts from draft-ietf-nntpext-base-09.txt
which is available in full from the usual Internet-Draft archives.]
8. The CAPABILITIES DISCOVERY Step
A client NNTP supporting NNTP service extensions should query
a server early in the session for extensions session by
issuing the LIST EXTENSIONS command. If the NNTP server
supports the NNTP service extensions it MUST give a successful
response (see section 8.1.1), a failure response (see section
8.1.2), or an error response (see section 8.1.3). If the NNTP
server does not support any NNTP service extensions, it MUST
generate an error response (see section 8.1.4).
8.1 LIST EXTENSIONS
If successful, the server NNTP MUST respond with code 202. On
failure, the server NNTP MUST respond with code 503. On error,
the server NNTP MUST respond with one of codes 400, 402, 500,
501 and 502.
This command MAY be issued at anytime during a session. It is
not required that the client issues this command before
attempting to make use of any extension. The response
generated by this command MAY change during a session because
of other state information. However, a client NNTP MUST NOT
cache (for use in another session) any information returned if
the LIST EXTENSIONS command succeeds. That is, a client NNTP
is only able to get the current and correct information
concerning available extensions during a session by issuing a
LIST EXTENSIONS command during that session and processing
that response.
Barber [Page 10]
INTERNET DRAFT November 1999
8.1.1 Successful response
If the server NNTP implements and is able to perform the LIST
EXTENSIONS command, it MUST return code 202.
Text following the return code on the first line of the reply
is free form, and not interpreted, and has no practical use,
as this text is not expected to be revealed to end users. The
syntax of other reply lines is precisely defined, and if
present, MUST be exactly as specified.
Each line listing an extension in the extension-listing begins
with a single space. That space IS NOT optional, nor does it
indicate general white space. This space guarantees that the
line can never be misinterpreted as the end of the extension-
listing, but is required even where there is no possibility of
ambiguity.
Each extension supported MUST be listed on a separate line to
facilitate the possible inclusion of parameters supported by
each extension command. The extension-label to be used in the
response to the LIST EXTENSIONS command will be specified as
each new extension is added to the NNTP command set. Often it
will be the name of a new command added; however this IS NOT
required. In fact, it IS NOT required that a new feature
actually adds a new command or keyword. Any parameters
included are to be specified with the definition of the
command concerned.
That specification SHALL also specify how any parameters
present are to be interpreted and how each parameter is
separated from other parameters.
The extension-label is nominally case sensitive, however the
definitions of specific labels and parameters specify the
precise interpretation, and it is to be expected that those
definitions will usually specify the label in a case
independent manner. Where this is done, implementations are
recommended to use US-ASCII upper case letters when
transmitting the extension response.
The LIST EXTENSIONS command itself is not included in the list
of features supported, support for the LIST EXTENSIONS command
is indicated by return of a reply other than a 500 or 502
reply.
The end of the list is defined by the usual period on a line
by itself.
A typical example reply to the LIST EXTENSIONS command might
be a multiline reply of the form:
Barber [Page 11]
INTERNET DRAFT November 1999
[C] LIST EXTENSIONS
[S] 202 Extensions supported:
[S] OVER
[S] PAT
[S] LISTGROUP
[S] .
The particular extensions shown here are simply examples of
what may be defined in other places, no particular meaning
should be attributed to them. Recall also, that the extension
names returned are not command names, as such, but simply
indications that the server possesses some attribute or other.
The order in which the extensions are returned is of no
importance, NNTP server processes are not required to
implement any particular order, or even to consistently return
the same order when the command is repeated.
8.1.2 Failure response
If for some reason the server NNTP is unable to list the
service extensions it supports, it MUST return code 503. No
list (not even an empty one) will be returned.
In the case of a failure response, the client NNTP may try the
extensions either as the need arises or configure itself for
the basic NNTP functionality defined in this document.
8.1.3 Error responses from extended servers
If the server NNTP recognizes the LIST EXTENSIONS command, but
due to various conditions cannot make any extensions available
to the client at the time the client issued the LIST
EXTENSIONS command, it MUST return code 402. No list (not even
an empty one) will be returned.
The client NNTP should configure itself for the basic NNTP
functionality defined in this document, or issue commands that
might change the state of the server, or issue the QUIT
command (see section 10.1) if a particular extension is
required for the client to properly operate.
Barber [Page 12]
INTERNET DRAFT November 1999
If the server NNTP determines that the NNTP service is no
longer available (e.g., due to imminent system shutdown), it
must return code 400. Note that this is response code should
not be generated due to an inactivity timeout as described in
section 4.
In the case of any error response outlined in this section,
the client NNTP should issue the QUIT command (see section
10.1).
8.1.4 Responses from servers without extensions
A server NNTP that conforms to this memo but does not support
the extensions specified here will not recognize the LIST
EXTENSIONS command and MUST consequently return code 500 or
code 501. The server NNTP SHALL stay in the same state after
returning this code. The client NNTP may try the extensions
either as the need arises or configure itself for the basic
NNTP functionality defined in this document.
8.1.5 Responses from improperly implemented servers
A server NNTP that improperly implements the LIST EXTENSIONS
command may return an empty list. Clients SHALL accommodate
this protocol violation and interpret it as a response code
402.
The client NNTP should configure itself for the basic NNTP
functionality defined in this document, or issue commands that
might change the state of the server, or issue the QUIT
command (see section 10.1) if a particular extension is
required for the client to properly operate.
--
Andrew.
Technical Details
Message-ID:
<87og93d352.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-mailShow Full Headers
Complete Article Headers
Message-ID: <87og93d352.fsf@erlenstar.demon.co.uk> Subject: [NNTP Draft] 8. The CAPABILITIES DISCOVERY Step Date: Sat, 26 Feb 2000 00:00:00 +0000 From: Andrew Gierth <andrew@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-mail X-Deja-AN: 590399682 X-Mayan-Date: Long count = 12.19.6.17.16; tzolkin = 13 Cib; haab = 4 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