[ietf-nntp] Further syntax

Clive D.W. Feather clive at demon.net
Mon Jan 26 04:34:09 PST 2004


I've added a new section to the formal syntax, giving the contents of
multi-line responses. Here's the text:

9.3 Multi-line response contents
   
   This syntax defines the content of the various multi-line responses, 
   in each case after any "dot-stuffing" has been undone. 
   
     multiline-response-content: article-response / 
           body-response / 
           hdr-response /
           head-response /
           help-response /
           list-active-response /
           list-active-times-response / 
           list-active-times-response /
           list-distrib-pats-response / 
           list-distributions-response /
           list-extensions-response /
           list-headers-response /
           list-newsgroups-response /
           list-overview-fmt-response /
           listgroup-response /
           newgroups-response /
           newnews-response /
           over-response
   
     article-response = article
     body-response = body 
     hdr-response = *(article-number SP hdr-content CRLF)
     head-response = 1*header
     help-response = *(*B-CHAR CRLF)
     list-active-response = *(newsgroup-name SPA article-number
           SPA article-number SPA newsgroup-status CRLF)
     list-active-times-response =
           *(newsgroup-name SPA 1*DIGIT SPA P-CHAR *U-CHAR CRLF)
     list-distrib-pats-response =
           *(1*DIGIT ":" wildmat ":" distribution CRLF)
     list-distributions-response = *(distribution SPA 1*U-CHAR CRLF)
     list-extensions-response =
            *(extension-label *(SP extension-argument) CRLF)
     list-headers-response = *(header-meta-name CRLF) /
            *((metadata-name / ":") CRLF)
     list-newsgroups-response = *(newsgroup-name WS P-CHAR *U-CHAR CRLF)
     list-overview-fmt-response = list-overview-fmt-text
     listgroup-response = *(article-number CRLF) 
     newgroups-response = list-active-response
     newnews-response = *(message-id CRLF)
     over-response = *(article-number over-content CRLF)
           
     list-overview-fmt-text =
           %x53.75.62.6A.65.63.74 ":" CRLF
           %x46.72.6F.6D ":" CRLF
           %x44.61.74.65 ":" CRLF
           %x4D.65.73.73.61.67.65 "-" %x49.44 ":" CRLF
           %x52.65.66.65.72.65.6E.63.65.73 ":" CRLF
           ( ":" %x62.79.74.65.73 CRLF ":" %x6C.69.6E.65.73 /
             %x42.79.74.65.73 ":" CRLF %x4C.69.6E.65.73 ":") CRLF
           *((header-name ":" %x66.75.6C.6C / metadata-name) CRLF)
     
     distribution = 1*P-CHAR
     extension-argument = 1*P-CHAR 
     extension-label = 1*12UPPER
     hdr-content = *(P-CHAR / SP)
     hdr-n-content = [(header-name ":" / metadata-name) SP hdr-content] 
     newsgroup-status = %x79 / %x6E / %x6D / private-status
     over-content = 1*6(TAB hdr-content) / 
           7(TAB hdr-content) *(TAB hdr-n-content)
     private-status = 1*P-CHAR ; except the values in newsgroup-status

and two new general rules:

     SPA = 1*SP
     UPPER = %41-5A

Please note:

* Delimiters between fields vary:
  HDR                - single space
  LIST ACTIVE        - one or more spaces
  LIST ACTIVE.TIMES  - one or more spaces
  LIST DISTRIB.PATS  - colon
  LIST DISTRIBUTIONS - one or more spaces
  LIST EXTENSIONS    - single space
  LIST NEWSGROUPS    - white space
  NEWGROUPS          - one or more spaces
  OVER               - single tab
I appreciate that many of these are for historical reasons, but is there
any tidying up we want to do?

* In general leading and trailing space is forbidden unless its part of the
underlying data (e.g. it's allowed for ARTICLE but not for LISTGROUP;
LIST NEWSGROUPS can't have leading space but can have trailing).

* I had to guess what characters are allowed in some contents. Here's the
choices I've made:
  HDR and OVER - the header contents are UTF-8 printable, they cannot
    contain tabs or other controls, but may contain spaces.
  HELP - as for article body; in particular, no requirement to be UTF-8.
  LIST ACTIVE - fourth field is UTF-8 printable, no spaces or controls.
  LIST ACTIVE.TIMES - second field has no limit on the number of digits;
    third field is UTF-8 and must start with a printable character, but
    may contain spaces or controls.
  LIST DISTRIBUTIONS - both fields are UTF-8; the distribution must not
    contain spaces or controls, but the description can.
  LIST NEWSGROUPS - the description is UTF-8 and must start with a
    printable character, but may contain spaces or controls.
  LIST OVERVIEW.FMT - all the text quoted in 8.5.2.2 is case-sensitive.

Any comments on this would be most welcome.

-- 
Clive D.W. Feather  | Work:  <clive at demon.net>   | Tel:    +44 20 8495 6138
Internet Expert     | Home:  <clive at davros.org>  | *** NOTE CHANGE ***
Demon Internet      | WWW: http://www.davros.org | Fax:    +44 870 051 9937
Thus plc            |                            | Mobile: +44 7973 377646



More information about the ietf-nntp mailing list