🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79382

200 or 201 at initial connection?

#79382
From: Julien ÉLIE
Date: Thu, 28 Aug 2008 20:26
78 lines
4075 bytes
Hi,

Hmm...  The classic question :)

According to a previous thread
    http://groups.google.fr/group/news.software.nntp/browse_frm/thread/967621f451962ace/

"Yes, there are clients that, if they get a 201 greeting, will never even
attempt to send POST and will just error out.  nnrpd should send a 200
greeting if there's any possibility for the client to authenticate, since
prior to authentication it doesn't know what the real privileges are
(think Perl and Python auth hooks, for instance)."

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?


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.

It is not clear for the second case I described.  Reading that, I understand
that it is 201 even though the client might be authorized to post after
authenticated.
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

What strikes me most is that it seems to be how nnrpd already behaves
for 200/201 while I was under the impression that it did not the right thing...

If, after authentication, the reader still does not have posting access,
it is the moment we drop POST from CAPABILITIES.  Right?


   Note: the distinction between the 200 and 201 response codes has
   turned out in practice to be insufficient; for example, some servers
   do not allow posting until the client has authenticated, while other
   clients assume that a 201 response means that posting will never be
   possible even after authentication.  Therefore, clients SHOULD use
   the CAPABILITIES command (Section 5.2) rather than rely on this
   response.

Still not clear.  The note does not give more explanation :-/
I think the three cases I see (do you have other ones?) should be given
in examples to make the note perfectly clear...


Thanks beforehand and sorry for that recurrent question...

-- 
Julien ÉLIE

« -- Nous voyageons plus vite que la lumière !
  -- Alors comment y voir clair dans tout ça ? » (Astérix) 
Technical Details
Message-ID: <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!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!feeder.news-service.com!news.motzarella.org!motzarella.org!news.trigofacile.com!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <g971md$r4v$1@news.trigofacile.com>
Subject: 200 or 201 at initial connection?
Date: Thu, 28 Aug 2008 22:26:44 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
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!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!feeder.news-service.com!news.motzarella.org!motzarella.org!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 78
NNTP-Posting-Host: aaubervilliers-151-1-89-50.w83-199.abo.wanadoo.fr
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="ISO-8859-15";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1219955213 27807 83.199.208.50 (28 Aug 2008
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Thu, 28 Aug 2008 20:26:53 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049