Article View: news.software.nntp
Article #44523Re: [NNTP Draft] 7. The GREETING Step (and MODE READER)
From: Curt Welch
Date: Sun, 27 Feb 2000 00:00
Date: Sun, 27 Feb 2000 00:00
138 lines
7148 bytes
7148 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote: > [This is one of a series of extracts from draft-ietf-nntpext-base-09.txt > which is available in full from the usual Internet-Draft archives.] > > 7. The GREETING Step > > 7.1 Initial Connection > > There is no keyword presented by the client upon initial > connection to the server. The server MUST present an > appropriate response code as a greeting to the client. This > response informs the client about what steps the client > should take to reach the news exchange step. > > The server MUST present a 200 greeting code if the client is > authorized to post articles though the use of the POST > keyword on this server. > > The server MUST present a 201 greeting code if the client is > not authorized to post articles using the POST keyword. > > The server MUST present a 502 greeting code if the client is > not permitted under any circumstances to interact with the > server. The server should immediately close the connection > with the client after presenting this code. > > In all other cases, the server MUST present a 400 greeting > code. This leaves it very unclear what the server should present if the client is not currently able to POST, but may be able to post after they authenticate themselves. 201 - because they can't post now? Or 200 because they can post if they can authenticate, but the need for that may not show up until the client tries the POST command, so we don't want to say 201 here and make the client think it shouldn't even try the post command, or 400 because this really is an "OTHER" case, but it's not really an error, so does 400 make sense???????? This is just so typical of the confusion that happens when you try to write a real-world server or client with these RFCs. You just can't do it with access to a few "real" servers, and that's just wrong. 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. 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. If I was writing a client, what would I do for a 400 response? Since it's undefined, but the server has given me a connection, then the only thing I can do as a client is to proceed. So how is this any different than a 200 or 201 from the point of view of a client? If 400 isn't used in common practice for something today, I'd sugest it be dropped as a possible greeting. If it is used in common practice for something, I'd suggest we define it as such here. Then I'd define 201 as a mode meaning "You have read access, but you will NEVER be able to use POST with this connection no matter how many MODE or AUTHINFO commands you send, etc.". 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. So, with a 502 response, the client knows it can't access the server and doesn't bother to try again -- or at least not anytime soon. With a 201 response, the client knows it should tell the user that he CAN NOT post to this server, and that it is reasobable to block the POST commands/buttons on the interface because the POST command will NEVER work for the connection. With the 200 response, the client can't tell anything about the connection yet and should just assume that anything in the RFC might work. > Example of a connection from any client where the server is > unable to provide service > > [C] Initial TCP connection completed > > [S] 400 NNTP Service temporarily unavailable > > At this point, the server closes the TCP connection. Ok, so looking at the example, It seems that someone thinks 400 should be a "you can't connect now, but maybe later" response. That's very different from "all other cases" as defined above. And the "disconnect after the response" is totally undocumented above. In no case should any example section add information or redefine something like this has here. I'd argue however, that even though this definition of the 400 code makes more sense than the one above, it really isn't needed. In both cases, the client is really forced to do the same thing, i.e. give up and maybe try again later. And in both cases the client should show the text of the response to the user. 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. I think since the client is likey not to behave any differently on a 400 vs a 500 code, that there's really no point in having both. Is there any current practice that would defend the use of both of these? And BTW, if 400 is going to drop the connection, it needs to always do that and it should be included in the documentation above and not just in the examples. > 7.1.2 MODE READER > > MODE READER I don't have the energy to deal with this right now :). -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<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-mailReferences:
<87putjd35j.fsf@erlenstar.demon.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <20000227011728.663$9r@newsreader.com>
Subject: Re: [NNTP Draft] 7. The GREETING Step (and MODE READER)
Date: Sun, 27 Feb 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <87putjd35j.fsf@erlenstar.demon.co.uk>
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: 590515460
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp