🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #44483

Re: [NNTP Draft] 7. The GREETING Step (and MODE READER)

#44483
From: Russ Allbery
Date: Sat, 26 Feb 2000 00:00
56 lines
3321 bytes
Curt Welch <curt@kcwc.com> writes:

> What's common practice these days?  I'm currently returning a 200 code
> for an unauthenticated connection, but once again, I don't know if I
> made that up or followed the practice of some other server.

INN appears to send 200 for unauthenticated connections that need to then
authenticate.

> With these codes to pick from, (and not reviewing common practice
> first), I'd say that 502 needs to be changed to read "the client is not
> currently permitted to connect".  This would include for example cases
> where the server was just blocking connections as a temporary condition
> (server paused, or load too high etc).  As well as the simple "you
> aren't authorized to connect here".  Because even that last case is
> something that may change in the future.  So 502 MUST be used for all
> cases where the server will close the connection after the response.

> I can't think of why 400 should be here.

One of the places where the NNTP return codes are mostly broken into
classes is 400 for temporary errors vs. 500 for permanent errors.
Returning 502 says that as best as the server can tell, you'll *never* be
allowed to connect.  400 is for some sort of temporary failure.

> If I was writing a client, what would I do for a 400 response?

That should be clarified.  In practice, I would expect the server to close
the connection following a 400 response.

> And then 200 would be the default greeting for all other states.  And
> the only thing a client knows about it's ability to use the POST command
> with this connetion is that it MIGHT work.

It would really be nice to be able to distinguish between "already
authenticated" and "need to authenticate" so that clients don't have to
keep additional state and be prepared to send authentication information
when a command is rejected.

> And I think it oppens the issue for some conditions where the server
> won't be able to figure out which they should send.  For example, if the
> server normally controls access by referencing a database, but the
> databse is currently down, does it return 400 responses to everyone even
> though for some, the problem isn't temporary, or 500 even though for
> some, the problem isn't perminate.

Every other protocol I'm aware of assumes temporary in this sort of case.

I think distinguising between temporary and permanent errors where
possible is a good idea, but I guess I don't feel that overly strong about
it.

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

Technical Details
Message-ID: <ylya87yug9.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.mbox.zip!not-for-mail
References: <87putjd35j.fsf@erlenstar.demon.co.uk> <20000227011728.663$9r@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <ylya87yug9.fsf@windlord.stanford.edu>
Subject: Re: [NNTP Draft] 7. The GREETING Step (and MODE READER)
Date: Sat, 26 Feb 2000 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <87putjd35j.fsf@erlenstar.demon.co.uk> <20000227011728.663$9r@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.mbox.zip!not-for-mail
X-Deja-AN: 590527990
Content-Type: text/plain; charset=us-ascii
Organization: The Eyrie
Mime-Version: 1.0
User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.1 (Biscayne)
Newsgroups: news.software.nntp