πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79383

Re: 200 or 201 at initial connection?

#79383
From: Russ Allbery
Date: Fri, 29 Aug 2008 00:57
56 lines
3014 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> So if I understand well, the cases are, at initial connection:
>
> * the reader can post right now in at least one group
>    -> 200
>    -> POST in CAPABILITIES
>
> * the reader cannot post right now but can authenticate and have posting
>  access to at least one group
>    -> 200
>    -> POST *not* in CAPABILITIES
>
> * the reader cannot post right now and cannot authenticate or if authenticated
>  will still not have posting access
>    -> 201
>    -> POST *not* in CAPABILITIES
>
> Am I right?

Correct.

> Because RFC 3977 says:
>
>   If the server will accept further commands from the client including
>   POST, the server MUST present a 200 greeting code.  If the server
>   will accept further commands from the client, but the client is not
>   authorized to post articles using the POST command, the server MUST
>   present a 201 greeting code.

Which, of course, doesn't tell you what to do if you don't know whether
the user will be able to post or not.  nnrpd errs on the side of caution
and presents 200.

> So perhaps it is:
>
> * the reader cannot post right now but can authenticate and have posting
>  access to at least one group
>    -> 201
>    -> POST in CAPABILITIES

No, you cannot advertise POST in CAPABILITIES unless the user can POST
right now without any additional authentication.  POST should only show up
after the user has acquired whatever authentication is needed so that they
can post.

CAPABILITIES has to be much more accurate than the 200/201.  It should
reflect the current state, including STARTTLS, authentication, MODE
READER, and so forth, and the standard makes it clear that its results may
change after those sorts of operations.

-- 
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: <877ia0k58u.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.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!news.stanford.edu!not-for-mail
References: <g971md$r4v$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <877ia0k58u.fsf@windlord.stanford.edu>
Subject: Re: 200 or 201 at initial connection?
Date: Thu, 28 Aug 2008 17:57:21 -0700
From: Russ Allbery <rra@stanford.edu>
References: <g971md$r4v$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.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!news.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 56
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.stanford.edu 1219971441 27627 171.64.19.147 (29 Aug 2008
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)
Cancel-Lock: sha1:CZ0yN86mTPsUaAf1nS5u/yNVfew=