Article View: news.software.nntp
Article #82036500 or 501 for invalid command lines?
From: Julien ÉLIE
Date: Thu, 22 Oct 2009 18:03
Date: Thu, 22 Oct 2009 18:03
43 lines
2545 bytes
2545 bytes
Hi,
What should be sent by a news server when a client
sends "A"? Is it 500 or 501?
"A" is not a command (it does not follow the syntax for
a command). It it an "unknown command" or a "syntax error
in command"?
Extracts from RFC 3977:
command-line = command EOL
command = X-command
X-command = keyword *(WS token)
keyword = ALPHA 2*(ALPHA / DIGIT / "." / "-")
token = 1*P-CHAR
Response code 500
Generic response
Meaning: unknown command.
Response code 501
Generic response
Meaning: syntax error in command.
If the command is not recognized, or if it is an optional command
that is not implemented by the server, the response code 500 MUST be
returned.
If there is a syntax error in the arguments of a recognized command,
including the case where more arguments are provided than the command
specifies or the command line is longer than the server accepts, the
response code 501 MUST be returned. The line MUST NOT be truncated
or split and then interpreted. Note that where a command has
variants depending on a second keyword (e.g., LIST ACTIVE and LIST
NEWSGROUPS), 501 MUST be used when the base command is implemented
but the requested variant is not, and 500 MUST be used only when the
base command itself is not implemented.
--
Julien ÉLIE
« Encore un peu, et cette histoire finira en queue de poisson ! » (Astérix)
Technical Details
Message-ID:
<hbq6r3$lpp$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <hbq6r3$lpp$1@news.trigofacile.com> Subject: 500 or 501 for invalid command lines? Date: Thu, 22 Oct 2009 20:03:58 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 43 NNTP-Posting-Host: aaubervilliers-151-1-27-37.w83-112.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-15"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1256234659 22329 83.112.18.37 (22 Oct 2009 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Thu, 22 Oct 2009 18:04:19 +0000 (UTC) X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049