Article View: news.software.nntp
Article #44474[NNTP Draft] 9.2 Retrieval of Articles and Article Sections
From: Andrew Gierth
Date: Sat, 26 Feb 2000 00:00
Date: Sat, 26 Feb 2000 00:00
670 lines
26239 bytes
26239 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.2 Retrieval of Articles and Article Sections
There are two forms to the ARTICLE command (and the related
BODY, HEAD, and STAT commands), each using a different method
of specifying which article is to be retrieved. When the
ARTICLE keyword is followed by a message-id in angle brackets
("<" and ">"), the first form of the command MUST be used;
when a numeric parameter or no parameter is supplied, the
second form MUST be invoked. In the cases where the argument
is a message-id, the article number specified in the response
must be zero. This is one of the special cases described in
section 9.1.
An article, as defined by RFC 1036, consists of two parts: the
article headers and the article body. When responding to an
article command, the server returns the entire article
contents and does not attempt to alter or translate them in
any way.
9.2.1 ARTICLE
ARTICLE [<message-id>|nnn]
This response displays the header, a blank line, then the body
(text) of the specified article. The optional parameter nnn is
the numeric id of an article in the current news group and
SHOULD be chosen from the range of articles provided when the
news group was selected. If it is omitted, the current
article is assumed. Message-id is the message id of an article
as shown in that article's header.
The internally maintained "current article pointer" MUST NOT
be altered when the message-id argument is used. This is both
to facilitate the presentation of articles that may be
referenced within an article being read, and because of the
semantic difficulties of determining the proper sequence and
membership of an article which may have been posted to more
than one news group.
Barber [Page 20]
INTERNET DRAFT November 1999
The internally-maintained "current article pointer" MUST be
set when a valid article number is specified as the argument.
This includes the case when an article number is implied by
the use of no argument.
A previously valid article number MAY become invalid if the
article has been removed. A previously invalid article number
MAY become valid if the article has been reinstated, but such
an article number MUST be no less than the reported low water
mark for that group.
If there is a valid article to present in a reply to this
command, a response indicating the current article number (or
zero when the message-id argument is used), a message-id
string, and that text is to follow MUST be returned.
The message-id string is an identification string contained
within angle brackets ("<" and ">"), which is derived from the
header of the article itself. The Message-ID header line
(required by RFC 1036) from the article must be used to supply
this information. If the message-id header line is missing
from the article, a single digit "0" (zero) should be supplied
within the angle brackets.
Since the message-id field is unique for each article, it may
be used by a news reading program to skip duplicate displays
of articles that have been posted more than once, or to more
than one news group.
9.2.1.1 Responses
220 n <a> article retrieved - head and body follow (n =
article number, <a> = message-id)
412 no news group has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found
502 Service unavailable
9.2.1.2 Examples
Example of a successful retrieval of an article (using no
article number)
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] ARTICLE
[S] 220 3000234 <45223423@to.to>
Path: pathost!demo!somewhere!not-for-mail
Barber [Page 21]
INTERNET DRAFT November 1999
From: nobody@nowhere.to (Demo User)
Newsgroups: misc.test
Subject: I am just a test article
Date: 6 Oct 1998 04:38:40 -0500
Organization: Nowhere, To
Message-ID: <45223423@to.to>
This is just a test article.
.
Example of a successful retrieval of an article by message-id
[S] 200 NNTP Service Ready
[C] ARTICLE <45223423@to.to>
[S] 220 0 <45223423@to.to>
Path: pathost!demo!somewhere!not-for-mail
From: nobody@nowhere.to (Demo User)
Newsgroups: misc.test
Subject: I am just a test article
Date: 6 Oct 1998 04:38:40 -0500
Organization: Nowhere, To
Message-ID: <45223423@to.to>
This is just a test article.
.
Example of an unsuccessful retrieval of an article by message-
id
[S] 200 NNTP Service Ready
[C] ARTICLE <i.am.not.there@nowhere.to>
[S] 430 No Such Article Found
Barber [Page 22]
INTERNET DRAFT November 1999
Example of an unsuccessful retrieval of an article by number
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 news.groups
[C] ARTICLE 300256
[S] 423 No such article number in this group
Example of an unsuccessful retrieval of an article by number
because no news group was selected first
[S] 200 NNTP Service Ready
[C] ARTICLE 300256
[S] 412 No news group selected
Example of an attempt to retrieve an article 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] ARTICLE
[S] 420 No current article selected
Example of a failure due to the service being unavailable
[S] 200 NNTP Service Ready
[C] ARTICLE <i.am.a.test.article@nowhere.to>
[S] 500 Service unavailable
9.2.2 HEAD
HEAD [<message-id>|nnn]
This response displays the header of the specified article.
The optional parameter nnn is the numeric id of an article in
the current news group and SHOULD be chosen from the range of
articles provided when the news group was selected. If it is
omitted, the current article is assumed. Message-id is the
message id of an article as shown in that article's header.
Barber [Page 23]
INTERNET DRAFT November 1999
The internally maintained "current article pointer" MUST NOT
be altered when the message-id argument is used. This is both
to facilitate the presentation of articles that may be
referenced within an article being read, and because of the
semantic difficulties of determining the proper sequence and
membership of an article which may have been posted to more
than one news group.
The internally-maintained "current article pointer" MUST be
set when a valid article number is specified as the argument.
This includes the case when an article number is implied by
the use of no argument.
A previously valid article number MAY become invalid if the
article has been removed. A previously invalid article number
MAY become valid if the article has been reinstated, but such
an article number MUST be no less than the reported low water
mark for that group.
If there is a valid article to present in a reply to this
command, a response indicating the current article number (or
zero when the message-id argument is used), a message-id
string, and that text is to follow MUST be returned.
The message-id string returned is an identification string
contained within angle brackets ("<" and ">"), which is
derived from the header of the article itself. The Message-ID
header line (required by RFC 1036) from the article must be
used to supply this information. If the message-id header line
is missing from the article, a single digit "0" (zero) should
be supplied within the angle brackets.
Since the message-id field is unique for each article, it may
be used by a news reading program to skip duplicate displays
of articles that have been posted more than once, or to more
than one news group.
9.2.2.1 Responses
221 n <a> article retrieved - head follows
412 no news group has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found
502 Service unavailable
9.2.2.2 Examples
Example of a successful retrieval of the headers in an article
(using no article number)
[S] 200 NNTP Service Ready
[C] GROUP misc.test
Barber [Page 24]
INTERNET DRAFT November 1999
[S] 211 1234 3000234 3002322 misc.test
[C] HEAD
[S] 220 3000234 <45223423@to.to>
Path: pathost!demo!somewhere!not-for-mail
From: nobody@nowhere.to (Demo User)
Newsgroups: misc.test
Subject: I am just a test article
Date: 6 Oct 1998 04:38:40 -0500
Organization: Nowhere, To
Message-ID: <45223423@to.to>
.
Example of a successful retrieval of the headers in an article
by message-id
[S] 200 NNTP Service Ready
[C] HEAD <45223423@to.to>
[S] 220 0 <45223423@to.to>
Path: pathost!demo!somewhere!not-for-mail
From: nobody@nowhere.to (Demo User)
Newsgroups: misc.test
Subject: I am just a test article
Date: 6 Oct 1998 04:38:40 -0500
Organization: Nowhere, To
Message-ID: <45223423@to.to>
.
Example of an unsuccessful retrieval of the header of an
article by message-id
[S] 200 NNTP Service Ready
Barber [Page 25]
INTERNET DRAFT November 1999
[C] HEAD <i.am.not.there@nowhere.to>
[S] 430 No Such Article Found
Example of an unsuccessful retrieval of the header of an
article by number
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] HEAD 300256
[S] 423 No such article number in this group
Example of an unsuccessful retrieval the header of an article
by number because no news group was selected first
[S] 200 NNTP Service Ready
[C] HEAD 300256
[S] 412 No news group selected
Example of an attempt to retrieve the header of an article
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] HEAD
[S] 420 No current article selected
Example of a failure due to the service being unavailable
[S] 200 NNTP Service Ready
[C] HEAD <i.am.a.test.article@nowhere.to>
[S] 500 Service unavailable
9.2.3 BODY
BODY [<message-id>|nnn]
This response displays the body (text) of the specified
article. The optional parameter nnn is the numeric id of an
article in the current news group and SHOULD be chosen from
Barber [Page 26]
INTERNET DRAFT November 1999
the range of articles provided when the news group was
selected. If it is omitted, the current article is assumed.
Message-id is the message id of an article as shown in that
article's header.
The internally maintained "current article pointer" MUST NOT
be altered when the message-id argument is used. This is both
to facilitate the presentation of articles that may be
referenced within an article being read, and because of the
semantic difficulties of determining the proper sequence and
membership of an article which may have been posted to more
than one news group.
The internally-maintained "current article pointer" MUST be
set when a valid article number is specified as the argument.
This includes the case when an article number is implied by
the use of no argument.
A previously valid article number MAY become invalid if the
article has been removed. A previously invalid article number
MAY become valid if the article has been reinstated, but such
an article number MUST be no less than the reported low water
mark for that group.
If there is a valid article to present in a reply to this
command, a response indicating the current article number (or
zero when the message-id argument is used), a message-id
string, and that text is to follow MUST be returned.
The message-id string returned is an identification string
contained within angle brackets ("<" and ">"), which is
derived from the header of the article itself. The Message-ID
header line (required by RFC 1036) from the article must be
used to supply this information. If the message-id header line
is missing from the article, a single digit "0" (zero) should
be supplied within the angle brackets.
Since the message-id field is unique for each article, it may
be used by a news reading program to skip duplicate displays
of articles that have been posted more than once, or to more
than one news group.
9.2.3.1 Responses
222 n <a> article retrieved - body follows
412 no news group has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found
502 Service unavailable
9.2.3.2 Examples
Example of a successful retrieval of the body of an article
(using no article number)
Barber [Page 27]
INTERNET DRAFT November 1999
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] BODY
[S] 222 3000234 <45223423@to.to>
This is just a test article.
.
Example of a successful retrieval of the body of an article by
message-id
[S] 200 NNTP Service Ready
[C] BODY <45223423@to.to>
[S] 222 0 <45223423@to.to>
This is just a test article.
.
Example of an unsuccessful retrieval of the body of an article
by message-id
[S] 200 NNTP Service Ready
[C] BODY <i.am.not.there@nowhere.to>
[S] 430 No Such Article Found
Example of an unsuccessful retrieval of the body of an article
by number
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] BODY 300256
[S] 423 No such article number in this group
Example of an unsuccessful retrieval of the body of an article
by number because no news group was selected first
[S] 200 NNTP Service Ready
Barber [Page 28]
INTERNET DRAFT November 1999
[C] BODY 300256
[S] 412 No news group selected
Example of an attempt to retrieve the body of an article 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] BODY
[S] 420 No current article selected
Example of a failure due to the service being unavailable
[S] 200 NNTP Service Ready
[C] BODY <i.am.a.test.article@nowhere.to>
[S] 500 Service unavailable
9.2.4 STAT
STAT [<message-id>|nnn]
This response returns only status information; no article
contents are returned. The optional parameter nnn is the
numeric id of an article in the current news group and SHOULD
be chosen from the range of articles provided when the news
group was selected. If it is omitted, the current article is
assumed. Message-id is the message id of an article as shown
in that article's header.
The internally maintained "current article pointer" MUST NOT
be altered when the message-id argument is used. This is both
to facilitate the presentation of articles that may be
referenced within an article being read, and because of the
semantic difficulties of determining the proper sequence and
membership of an article which may have been posted to more
than one news group.
The internally-maintained "current article pointer" MUST be
set when a valid article number is specified as the argument.
This includes the case when an article number is implied by
the use of no argument.
A previously valid article number MAY become invalid if the
article has been removed. A previously invalid article number
MAY become valid if the article has been reinstated, but such
an article number MUST be no less than the reported low water
mark for that group.
Barber [Page 29]
INTERNET DRAFT November 1999
If there is a valid article to present in a reply to this
command, a response indicating the current article number (or
zero when the message-id argument is used) and a message-id
string MUST be returned.
The message-id string returned is an identification string
contained within angle brackets ("<" and ">"), which is
derived from the header of the article itself. The Message-ID
header line (required by RFC 1036) from the article must be
used to supply this information. If the message-id header line
is missing from the article, a single digit "0" (zero) should
be supplied within the angle brackets.
Since the message-id field is unique for each article, it may
be used by a news reading program to skip duplicate displays
of articles that have been posted more than once, or to more
than one news group.
9.2.4.1 Responses
223 n <a> article retrieved - request text separately
412 no news group has been selected
420 no current article has been selected
423 no such article number in this group
430 no such article found
502 Service unavailable
9.2.4.2 Examples
Example of STAT on an existing article (using no article
number)
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] STAT
[S] 223 3000234 <45223423@to.to>
Example of a STAT of an existing article by message-id
[S] 200 NNTP Service Ready
[C] STAT <45223423@to.to>
[S] 223 0 <45223423@to.to>
Barber [Page 30]
INTERNET DRAFT November 1999
Example of an STAT of an article not on the server by message-
id
[S] 200 NNTP Service Ready
[C] STAT <i.am.not.there@nowhere.to>
[S] 430 No Such Article Found
Example of STAT of an article not in the server by number
[S] 200 NNTP Service Ready
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] STAT 300256
[S] 423 No such article number in this group
Example of STAT of an article by number when no news group was
selected first
[S] 200 NNTP Service Ready
[C] STAT 300256
[S] 412 No news group selected
Example of STAT of an article 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] STAT
[S] 420 No current article selected
Example of a failure due to the service being unavailable
[S] 200 NNTP Service Ready
[C] STAT <i.am.a.test.article@nowhere.to>
[S] 500 Service unavailable
--
Andrew.
Technical Details
Message-ID:
<877lfrd2t0.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: <877lfrd2t0.fsf@erlenstar.demon.co.uk> Subject: [NNTP Draft] 9.2 Retrieval of Articles and Article Sections 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: 590401088 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