Article View: news.software.nntp
Article #82039Re: 500 or 501 for invalid command lines?
From: D. Stussy
Date: Thu, 22 Oct 2009 21:38
Date: Thu, 22 Oct 2009 21:38
46 lines
2817 bytes
2817 bytes
"Julien ΓLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message news:hbq6r3$lpp$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. For REPETITIVE blank lines, I'd issue a 500. (Is that the "real" question?) > 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.
Technical Details
Message-ID:
<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!weretis.net!feeder1.news.weretis.net!news.snarked.org!not-for-mailReferences:
<hbq6r3$lpp$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <hbqjdg$h6a$1@snarked.org> Subject: Re: 500 or 501 for invalid command lines? Date: Thu, 22 Oct 2009 14:38:58 -0700 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> References: <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!border1.nntp.ams.giganews.com!nntp.giganews.com!news.telesweet.net!weretis.net!feeder1.news.weretis.net!news.snarked.org!not-for-mail Newsgroups: news.software.nntp Lines: 46 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 1256247536 17610 71.160.18.32 (22 Oct 2009 21:38:56 GMT) X-Complaints-To: newsmaster@snarked.org NNTP-Posting-Date: Thu, 22 Oct 2009 21:38:56 +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