ietf-nntp Response codes - debugging, authentication & unknown
Lee Kindness
lkindness at csl.co.uk
Wed Aug 9 02:33:00 PDT 2000
I've put together my opinions into a reworded section 4.1, changes and
additions are marked by '!':
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 broadly 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.
! 9xx - Reserved for a possible future debugging extension.
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
! x7x - Nonstandard (private implementation) extensions
! x8x - Authentication
! x9x - Private debugging output
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 make
! a 'best guess' on how to treat the response - typically the
! first digit is used for this purpose.
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 x7x
! specified above.
The use of unspecified response codes for a standard command
is prohibited.
! The status indicator pattern x9x is provided for private
! debugging. The use of these responses is out of the scope
! of this standard. Deployed servers MUST NOT present
! debugging responses to clients without prior arrangement.
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.
Comments are welcomed.
--
Lee Kindness
More information about the ietf-nntp
mailing list