🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82021

Re: Spaces in NNTP commands

#82021
From: Russ Allbery
Date: Sun, 18 Oct 2009 16:54
34 lines
2719 bytes
curt@kcwc.com (Curt Welch) writes:

> I have no clue what the specs they have written on this recently say,
> but all NNTP servers I've used, or written, always ignored empty lines.
> I use NNTP servers as command shells interactively and I like my command
> servers to not bitch at me just because I hit return. :)

The only drawback that I can see to accepting and ignoring blank lines is
that if a client intended to send a command and for some unknown reason
accidentally sent a blank line, it's likely to then deadlock waiting for a
server response.  That can be a lot harder to debug than an error message
complaining about an empty line.

But given that we've ignored empty lines for years, I'm not sure it's
worth changing just for that.

> Again, all the NNTP servers I've used or written, act like a command
> shell and allow extra spaces everywhere, including in front of the
> commands or after the last argument.  Command parsing works by breaking
> the line into an argc/argv like structure based on spaces so it simply
> allows spaces everywhere around the words that make up the command.

I think ignoring unambiguous whitespace falls comfortably into the "be
liberal in what you accept" policy in a way that causes no harm.  It makes
things much more convenient when sending commands by hand.

(I'm actually on vacation and about to disappear for a while, so any
replies to this message may take some time for a response.)

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87vdic3an2.fsf@windlord.stanford.edu>
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!de-l.enfer-du-nord.net!news.glorb.com!news2.glorb.com!usenet.stanford.edu!news.stanford.edu!not-for-mail
References: <hbdap8$7e8$1@news.trigofacile.com> <20091018102618.742$eW@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <87vdic3an2.fsf@windlord.stanford.edu>
Subject: Re: Spaces in NNTP commands
Date: Sun, 18 Oct 2009 09:54:57 -0700
From: Russ Allbery <rra@stanford.edu>
References: <hbdap8$7e8$1@news.trigofacile.com> <20091018102618.742$eW@newsreader.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!de-l.enfer-du-nord.net!news.glorb.com!news2.glorb.com!usenet.stanford.edu!news.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 34
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.stanford.edu 1255884897 5351 171.67.225.134 (18 Oct 2009
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock: sha1:B2BeDFcAp6HJyiZPq8QPwweqIe8=