ietf-nntp Response codes - debugging, authentication & unknown

Lee Kindness lkindness at csl.co.uk
Thu Aug 10 01:30:56 PDT 2000


Clive D.W. Feather writes:
 >       x8x - Reserved for authentication extensions
 >       x9x - Reserved for private extensions
 >     Neither this document nor any extension registered with IANA (see
 >     section 12) will specify any response codes of the x9x pattern.

I've collated the comments and redrafted the section:

     4.1 Response Codes 

       Each response MUST begin with a three-digit status indicator. 
       These are status reports from the server and indicate the 
       response to the last command received from the client. 

!      The first digit of the response indicates the success, failure,
       or progress of the previous command. 

        1xx - Informative message 
        2xx - Command ok 
        3xx - Command ok so far, send the rest of it. 
        4xx - Command was correct, but couldn't be performed for some 
              reason. 
        5xx - Command unimplemented, or incorrect, or a serious 
              program error occurred.

       The next digit in the code indicates the function response 
       category. 

        x0x - Connection, setup, and miscellaneous messages.
        x1x - Newsgroup selection.
        x2x - Article selection.
        x3x - Distribution functions.
        x4x - Posting.
!       x8x - Reserved for authentication and authorisation.
!       x9x - Reserved for nonstandard (private implementation)
!             extensions.

       The exact response codes that can be returned in response to a 
       given command are detailed in the description of the keyword 
!      that is the first part of the command. If a client receives 
!      an unexpected response code from a command then it MUST use
!      the first digit of the response to determine the result. For
!      example 2xx would be a successful response, 4xx and 5xx
!      unsuccessful.

       Certain response codes contain parameters such as numbers and 
       names in addition to the status indicator. In those cases, the 
       number and type of such parameters MUST be fixed for each 
       response code to simplify interpretation of the response. In 
       all other cases, the client MUST only use the status indicator 
       itself to determine the nature of the response. 

       Parameters MUST be separated from the numeric status indicator 
       and from each other by a single US-ASCII space. All numeric 
       parameters MUST be in base 10 (decimal) format, and MAY have 
       leading zeros. All string parameters MUST begin after the 
       separating space, and MUST end before the following separating 
       space or the US-ASCII CRLF pair at the end of the line. 
       (Therefore, string parameters MUST NOT contain US-ASCII 
       spaces.) All text, if any, in the response which is not a 
       parameter of the response must follow and be separated from 
!      the last parameter, or respose code, by an US-ASCII space. 
       Also, note that the text following a response number may vary 
       in different implementations of the server. The 3-digit numeric 
       status indicator should be used to determine what response was 
       sent. 

       Response codes not specified in this standard MAY be used for 
       any installation-specific additional commands also not 
!      specified. These SHOULD be chosen to fit the pattern of x9x 
!      specified above. Neither this document, nor any extension
!      registered with IANA (see section 12), will specify any
!      x9x response codes.

*      The use of unspecified response codes for a standard command 
       is prohibited. 

       A server MUST respond to an unrecognized, unimplemented, or 
       syntactically invalid command with a negative response code 
       (status indicators of the form 5xx). For unrecognized 
       commands, the 500 response code MUST be returned. This 
       includes servers that have not implemented the optional 
       extensions outlined later in this memo. For recognized 
       commands where the syntax is wrong, the 501 response code MUST 
       be returned. A server MUST respond to a command issued when 
       the session is in an incorrect state by responding with a 
       negative status indicator. This may be from either the 4xx or 
       5xx group as appropriate. 


However I'm a little uncertain of the paragraph marked *. I think the
following might be more suitable, and desirable:

       The use of unspecified response codes for a standard command 
!      is prohibited unless implemented by the 'LIST EXTENSIONS'
!      mechanism.

-- 
 Lee Kindness             lkindness at csl.co.uk
 Software Engineer        +44 (0)131 5575595
 Concept Systems Ltd.     http://www.csl.co.uk/



More information about the ietf-nntp mailing list