[NNTP] NNTP syntax
Clive D.W. Feather
clive at demon.net
Fri Apr 29 05:14:52 PDT 2005
Following Ken's comments, I've made some minor changes to the formal
syntax section. Here is a complete set of changes to the syntax since
26.pre-1.
[I'm amazed at some of the errors that have slipped through all the way to
now. See if you can spot them.]
@@@@
initial-response-line =
- simple-response-content [SP trailing-comment] CRLF
+ initial-response-content [SP trailing-comment] CRLF
- simple-response-content = X-simple-response-content
+ initial-response-content = X-initial-response-content
- X-simple-response-content = 3DIGIT *(SP response-argument)
+ X-initial-response-content = 3DIGIT *(SP response-argument)
response-argument = 1*A-CHAR
trailing-comment = *U-CHAR
@@@@
- simple-response-content =/ response-111-content
+ initial-response-content =/ response-111-content /
- response-211-content
+ response-211-content /
- response-22x-content
+ response-22x-content /
response-401-content
@@@@
This syntax defines the content of the various multi-line responses;
more precisely, it defines the part of the response in the multi-line
- data block after any "byte-stuffing" has been undone.
+ data block after any "byte-stuffing" has been undone. The numeric
+ portion of each non-terminal name indicates the response code that is
+ followed by this data.
- multi-line-response-content = article-response /
+ multi-line-response-content = article-220-response /
- body-response /
+ body-222-response /
- capabilities-response /
+ capabilities-101-response /
- hdr-response /
+ hdr-225-response /
- head-response /
+ head-221-response /
- help-response /
+ help-100-response /
- list-response /
+ list-215-response /
- listgroup-response /
+ listgroup-211-response /
- newgroups-response /
+ newgroups-231-response /
- newnews-response /
+ newnews-230-response /
- over-response
+ over-224-response
- article-response = article
+ article-220-response = article
- body-response = body
+ body-222-response = body
- capabilities-response = 1*(capability-line CRLF)
+ capabilities-101-response = version-line CRLF
+ *(capability-line CRLF)
- hdr-response = *(article-number SP hdr-content CRLF)
+ hdr-225-response = *(article-number SP hdr-content CRLF)
- head-response = 1*header
+ head-221-response = 1*header
- help-response = *(*B-CHAR CRLF)
+ help-100-response = *(*U-CHAR CRLF)
- list-response = body
+ list-215-response = list-content
- listgroup-response = *(article-number CRLF)
+ listgroup-211-response = *(article-number CRLF)
- newgroups-response = *(newsgroup-name SPA article-number
+ newgroups-231-response = active-groups-list
- newnews-response = *(message-id CRLF)
+ newnews-230-response = *(message-id CRLF)
- over-response = *(article-number over-content CRLF)
+ over-224-response = *(article-number over-content CRLF)
+ active-groups-list = *(newsgroup-name SPA article-number
SPA article-number SPA newsgroup-status CRLF)
hdr-content = *S-NONTAB
hdr-n-content = [(header-name ":" / metadata-name) SP hdr-content]
+ list-content = body
newsgroup-status = %x79 / %x6E / %x6D / private-status
over-content = 1*6(TAB hdr-content) /
7(TAB hdr-content) *(TAB hdr-n-content)
@@@@
over-capability /
post-capability /
+ reader-capability
- reader-capability /
- version-capability
@@@@
over-capability = "OVER" [WS "MSGID"]
post-capability = "POST"
reader-capability = "READER" [WS "LISTGROUP"]
- version-capability = "VERSION" 1*(WS version-number)
+
+ version-line = "VERSION" 1*(WS version-number)
version-number = nzDIGIT *5DIGIT
@@@@
9.5 LIST variants
This section defines more specifically the keywords for the LIST
- command and the syntax of the corresponding responses.
+ command and the syntax of the corresponding response contents.
; active
list-arguments =/ "ACTIVE" [WS wildmat]
- list-response =/ list-active-response
+ list-content =/ list-active-content
- list-active-response = newgroups-response
+ list-active-content = active-groups-list
; active.times
list-arguments =/ "ACTIVE.TIMES" [WS wildmat]
- list-response =/ list-active-times-response
+ list-content =/ list-active-times-content
- list-active-times-response =
+ list-active-times-content =
*(newsgroup-name SPA 1*DIGIT SPA newsgroup-creator CRLF)
newsgroup-creator = U-TEXT
; distrib.pats
list-arguments =/ "DISTRIB.PATS"
- list-response =/ list-distrib-pats-response
+ list-content =/ list-distrib-pats-content
- list-distrib-pats-response =
+ list-distrib-pats-content =
*(1*DIGIT ":" wildmat ":" distribution CRLF)
distribution = token
; headers
list-arguments =/ "HEADERS" [WS ("MSGID" / "RANGE")]
- list-response =/ list-headers-response
+ list-content =/ list-headers-content
- list-headers-response = *(header-meta-name CRLF) /
+ list-headers-content = *(header-meta-name CRLF) /
*((metadata-name / ":") CRLF)
; newsgroups
list-arguments =/ "NEWSGROUPS" [WS wildmat]
- list-response =/ list-newsgroups-response
+ list-content =/ list-newsgroups-content
- list-newsgroups-response =
+ list-newsgroups-content =
*(newsgroup-name WS newsgroup-description CRLF)
newsgroup-description = S-TEXT
; overview.fmt
list-arguments =/ "OVERVIEW.FMT"
- list-response =/ list-overview-fmt-response
+ list-content =/ list-overview-fmt-content
- list-overview-fmt-response = "Subject:" CRLF
+ list-overview-fmt-content = "Subject:" CRLF
"From:" CRLF
@@@@
- simple-response-content
+ initial-response-content
for each new response code that has arguments - the syntax of each
- response MUST be compatible with the definition of <X-simple-
+ response MUST be compatible with the definition of <X-initial-
response-content>;
@@@@
- list-response
+ list-content
for each new variant of the LIST command - the syntax MUST show
the response after the lines containing the 215 response code and
the terminating octet have been removed and any "byte-stuffing"
--
Clive D.W. Feather | Work: <clive at demon.net> | Tel: +44 20 8495 6138
Internet Expert | Home: <clive at davros.org> | Fax: +44 870 051 9937
Demon Internet | WWW: http://www.davros.org | Mobile: +44 7973 377646
Thus plc | |
More information about the ietf-nntp
mailing list