Article View: news.software.nntp
Article #82041Re: 500 or 501 for invalid command lines?
From: Julien ÉLIE
Date: Fri, 23 Oct 2009 21:47
Date: Fri, 23 Oct 2009 21:47
49 lines
2685 bytes
2685 bytes
Hi D. Stussy,
>> 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"?
>
> You seem to answer your own question: 500.
>
> Now, for a command "A B" where A is valid, and B is not: 501.
My point was that "A" is not a command; a command is a keyword
of at least three chars:
command-line = command EOL
command = X-command
X-command = keyword *(WS token)
keyword = ALPHA 2*(ALPHA / DIGIT / "." / "-")
500 is for an "unknown command".
It is like we say: we expect a noun and send 500 if we receive
an "unknown noun". The grammar mentions that a noun does not
begin with "to".
Then, what if I send "to be"?
500 because of an "unknown noun" or 501 because of a "syntax
error in noun"?
"to be" is not an "unknown noun" since it is not a noun.
There is a syntax error here.
If we consider 500 for an "unknown command line" and 501 for
a "syntax error in command line", it looks more 501 for our case
(500 being for a syntactically correct command line, with
an unknown command).
Well, I do not know if I am clear in what I am trying to say...
--
Julien ÉLIE
« -- Il est vraiment formidable !
-- Qui ça ?
-- Ben, vous.
-- Ah, lui ! » (César)
Technical Details
Message-ID:
<hbt89a$a51$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!border1.nntp.ams.giganews.com!nntp.giganews.com!news.telesweet.net!gegeweb.org!news.trigofacile.com!not-for-mailReferences:
<hbq6r3$lpp$1@news.trigofacile.com> <hbqjdg$h6a$1@snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <hbt89a$a51$1@news.trigofacile.com> Subject: Re: 500 or 501 for invalid command lines? Date: Fri, 23 Oct 2009 23:47:22 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <hbq6r3$lpp$1@news.trigofacile.com> <hbqjdg$h6a$1@snarked.org> 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!border1.nntp.ams.giganews.com!nntp.giganews.com!news.telesweet.net!gegeweb.org!news.trigofacile.com!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 49 NNTP-Posting-Host: aaubervilliers-151-1-27-37.w83-112.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1256334443 10401 83.112.18.37 (23 Oct 2009 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Fri, 23 Oct 2009 21:47:23 +0000 (UTC) In-Reply-To: <hbqjdg$h6a$1@snarked.org> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049