Thread View: news.software.nntp
1 messages
1 total messages
Started by Andrew Gierth
Sat, 26 Feb 2000 00:00
[NNTP Draft] 9. The NEWS EXCHANGE Step
Author: Andrew Gierth
Date: Sat, 26 Feb 2000 00:00
Date: Sat, 26 Feb 2000 00:00
366 lines
15668 bytes
15668 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.]
9. The NEWS EXCHANGE Step
During this step, two basic types of transactions occur:
. article retrieval from the server
. article posting to the server
9.1 Article Retrieval
News reading clients have available a variety of mechanisms to
retrieve articles via NNTP. The news articles are stored and
indexed using three types of keys. One key is the message id
of an article. According to RFC 1036, this identifier should
be globally unique. Another key is composed of the news group
name and the article number within that news group. That key
MUST be unique to a particular server (there will be only one
Barber [Page 13]
INTERNET DRAFT November 1999
article with that number within a particular news group), but
is not required to be globally unique. Additionally, because
the same article can be cross-posted to multiple news groups,
there may be multiple keys that point to the same article on
the same server. The final key is the arrival timestamp,
giving the time that the article arrived at the server.
The server MUST ensure that article numbers are issued in
order of arrival timestamp; that is, articles arriving later
MUST have higher numbers than those that arrive earlier. The
server SHOULD allocate the next sequential unused number to
each new article.
Article numbers MUST lie between 1 and 4,294,967,295
inclusive. The client and server SHOULD NOT use leading zeroes
in specifying article numbers, and MUST NOT use more than 16
digits. In some situations, the value zero replaces an article
number to show some special situation. One case involves
responses to the ARTICLE, STAT, BODY and HEAD commands where a
<message-id> is specified as the argument. In those cases, the
"current article pointer" is not changed.
9.1.1 Article Retrieval by News Group Name and Article Number
The following commands are used to set the current news group
name and the "current article pointer" which is used by other
commands for article retrieval.
9.1.1.1 GROUP
GROUP ggg
The required parameter ggg is the name of the news group to be
selected (e.g. "news.software.b"). A list of valid news groups
may be obtained by using the LIST keyword. See section 9.4
for more information on the LIST keyword.
The successful selection response will return the article
numbers of the first and last articles in the group at the
moment of selection (these numbers are referred to as the
"reported low water mark" and the "reported high water mark"),
and an estimate of the number of articles on file in the
group.
If the group is not empty, the estimate MUST be at least the
actual number of articles available, and MUST be no greater
than one more than the difference between the reported low and
high water marks. (Some implementations will actually count
the number of articles on file. Others will just subtract the
low water mark from the high water mark and add one to get an
estimate.)
Barber [Page 14]
INTERNET DRAFT November 1999
If the group is empty, one of the following three situations
will occur. Clients MUST accept all three cases; servers MUST
NOT represent an empty group in any other way.
. The high water mark will be one less than the low water mark,
and the estimated article count will be zero. Servers SHOULD
use this method to show an empty group. This is the only time
that the high water mark can be less than the low water mark.
. All three numbers will be zero.
. The high water mark is greater than or equal to the low water
mark; the estimated article count might be zero or non-zero;
if non-zero, the same requirements apply as for a non-empty
group.
The set of articles in a group may change after the GROUP
command is carried out. That is:
. articles may be removed from the group
. articles may be reinstated in the group with the same article
number, but those articles MUST have numbers no less than the
reported low water mark (note that this is a reinstatement of
the previous article, not a new article reusing the number)
. new articles may be added with article numbers greater than
the reported high water mark (if an article that was the one
with the highest number has been removed, the next new article
will not have the number one greater than the reported high
water mark)
Except when the group is empty and all three numbers are zero,
whenever a subsequent GROUP command for the same news group is
issued, either by the same client or a different client, the
reported low water mark in the response MUST be no less than
that in any previous response for that news group sent to any
client. The client may make use of the low water mark to
remove all remembered information about articles with lower
numbers, as these will never recur. This includes the
situation when the high water mark is one less than the low
water mark.
No similar assumption can be made about the high water mark,
as this can decrease if an article is removed, and then
increase again if it is reinstated or if new articles arrive.
When a valid group is selected by means of this command, the
internally maintained "current article pointer" MUST be set to
the first article in the group and the name of the current
news group MUST be set to the selected news group name. If an
invalid group is specified, the previously selected group and
article MUST remain selected. If an empty news group is
selected, the "current article pointer" is in an indeterminate
state and MUST NOT be used.
Barber [Page 15]
INTERNET DRAFT November 1999
The GROUP keyword MUST be used by a client and a successful
response received before the any other command is used that
depends on having the "current article pointer" be valid.
9.1.1.1.1 Responses
211 n f l s group selected
(n = estimated number of articles in group, f = first
article number in the group, l = last article number in
the group, s = name of the group.)
411 no such news group
9.1.1.1.2 GROUP Examples
Example for a group known to the server
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
Example for a group unknown to the server
[C] GROUP example.is.sob.bradner.or.barber
[S] 411 example.is.sob.bradner.or.barber is unknown
9.1.1.2 LAST
LAST
The internally maintained "current article pointer" MUST be
set to the previous article in the current news group. If
already positioned at the first article of the news group, an
error message MUST be returned and the current article MUST
remain selected.
There MAY be no previous article in the group, although the
current article number is not the reported low water mark.
There MUST NOT be a previous article when the current article
number is the reported low water mark.
Because articles can be removed and added, the results of
multiple LAST and NEXT commands MAY not be consistent over the
life of a particular NNTP session.
The internally-maintained "current article pointer" MUST be
set by this command.
A response indicating the current article number and a
message-id string MUST be returned. No article text is sent in
response to this command.
Barber [Page 16]
INTERNET DRAFT November 1999
9.1.1.2.1 Responses
223 n a article retrieved - request text separately (n =
article number, a = unique article id)
412 no news group selected
420 no current article has been selected
422 no previous article in this group
9.1.1.2.2 LAST Examples
Example of a successful article retrieval using LAST
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] NEXT
[S] 223 3000237 <668929@domain.com> retrieved
[C] LAST
[S] 223 3000234 <45223423@to.to> retrieved
Example of an attempt to retrieve an article without having
selected a group (via the GROUP command) first
[S] 200 NNTP Service ready
[C] LAST
[S] 412 no newsgroup selected
Example of an attempt to retrieve an article using the LAST
command when the current article pointer is pointing at the
first article in the group
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] LAST
[S] 422 No previous article to retrieve
Barber [Page 17]
INTERNET DRAFT November 1999
Example of an attempt to retrieve an article using the LAST
command when the current group selected is empty
[S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup
[C] LAST
[S] 420 No current article selected
9.1.1.3 NEXT
NEXT
The internally maintained "current article pointer" MUST be
advanced to the next article in the current news group. If no
more articles remain in the current group, an error message
MUST be returned and the current article MUST remain selected.
The internally-maintained "current article pointer" MUST be
set by this command.
A response indicating the current article number and the
message-id string MUST be returned. No text is sent in
response to this command.
9.1.1.3.1 Responses
223 n a article retrieved - request text separately (n =
article number, a = unique article id)
412 no news group selected
420 no current article has been selected
421 no next article in this group
9.1.1.3.2 NEXT Examples
Example of a successful article retrieval using NEXT
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] NEXT
[S] 223 3000237 <668929@domain.com> retrieved
Barber [Page 18]
INTERNET DRAFT November 1999
Example of an attempt to retrieve an article without having
selected a group (via the GROUP command) first
[S] 200 NNTP Service ready
[C] NEXT
[S] 412 no newsgroup selected
Example of an attempt to retrieve an article using the NEXT
command when the current article pointer is pointing at the
first article in the group
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] ARTICLE 3002322
[S] 220 3002322 <411@whitehouse.gov> retrieved
Path: pathost!demo!whitehouse!not-for-mail
From: nobody@whitehouse.gov(Demo User)
Newsgroups: misc.test
Subject: I am just a test article
Date: 6 Oct 1998 04:38:40 -0500
Organization: The White House, Washington, DC
Message-ID: <411@whitehouse.gov>
This is just a test article.
.
[C] NEXT
[S] 422 No next article to retrieve
Example of an attempt to retrieve an article using the NEXT
command when the current group selected is empty
Barber [Page 19]
INTERNET DRAFT November 1999
[S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup
[C] NEXT
[S] 420 No current article selected
--
Andrew.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads