Article View: news.software.nntp
Article #82042Re: 500 or 501 for invalid command lines?
From: D. Stussy
Date: Sat, 24 Oct 2009 01:55
Date: Sat, 24 Oct 2009 01:55
45 lines
2778 bytes
2778 bytes
"Julien ΓLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message news:hbt89a$a51$1@news.trigofacile.com... > >> 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... One sends 500. We don't see the other stuff unless the first "word" (non-whitespace) is valid.
Technical Details
Message-ID:
<hbtmqg$ntj$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!newsfeed101.telia.com!megatron.dk.telia.net!news.astraweb.com!border1.a.newsrouter.astraweb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news.he.net!news.snarked.org!not-for-mailReferences:
<hbq6r3$lpp$1@news.trigofacile.com> <hbqjdg$h6a$1@snarked.org> <hbt89a$a51$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <hbtmqg$ntj$1@snarked.org> Subject: Re: 500 or 501 for invalid command lines? Date: Fri, 23 Oct 2009 18:55:28 -0700 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> References: <hbq6r3$lpp$1@news.trigofacile.com> <hbqjdg$h6a$1@snarked.org> <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!newsfeed101.telia.com!megatron.dk.telia.net!news.astraweb.com!border1.a.newsrouter.astraweb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news.he.net!news.snarked.org!not-for-mail Newsgroups: news.software.nntp Lines: 45 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> NNTP-Posting-Host: pool-71-160-18-32.lsanca.dsl-w.verizon.net X-Trace: snarked.org 1256349328 24499 71.160.18.32 (24 Oct 2009 01:55:28 GMT) X-Complaints-To: newsmaster@snarked.org NNTP-Posting-Date: Sat, 24 Oct 2009 01:55:28 +0000 (UTC) X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478