Article View: news.software.nntp
Article #66864Re: New NNTP draft -- Sections 1-3
From: Andrew - Supernews
Date: Sun, 19 Oct 2003 03:13
Date: Sun, 19 Oct 2003 03:13
90 lines
5483 bytes
5483 bytes
In article <uTJ89aeAzZk$EwQE@romana.davros.org>, Clive D. W. Feather wrote: > In article <slrnbp2c8b.2sl5.andrew+nonews@trinity.supernews.net>, Andrew > - Supernews <andrew+nonews@supernews.com> writes >>We currently abort the connection if a command line is too long (more than >>the maximum allowed number of octets). This is possibly suboptimal and may >>be fixed in the future if it becomes an issue. > > I would delete the "possibly". Doing it doesn't allow the client to > discover it's at fault rather than just tickling a server bug, whereas a > 501 is a pretty unambiguous indication. yes. There are a couple of reasons why we do it that way which would not apply in a more general case. However, as I said, it will probably change in the future and 501 looks like the appropriate response. >>> If the server experiences an internal fault or problem that means it >>> is unable to carry out the command (for example, a necessary file is >>> missing or a necessary service could not be contacted), the response >>> code 403 MUST be returned. >>This appears to be new. > > We felt it was desirable to distinguish "the server doesn't do this" > from "the server can't do this right now, but it might work another > time". > >>We currently return 503 for the only case where this applies to us; if the >>client attempts a POST command but no posting server can be contacted (we >>tunnel POST operations to a specialised server). > > That's precisely the sort of situation where 403 is apt. OK. That doesn't concern me much because no existing clients that I know of will treat either 403 or 503 in response to POST as anything other than "unexpected server error". >>> 502: it is necessary to terminate the connection and start a new one >>> with the appropriate authority before the command can be used. >>> Note that the server MUST NOT close the TCP connection immediately >>> after a 502 response except at the initial connection (Section >>> 5.1) and with the MODE READER (Section 5.2) command. See also the >>> latter command for historical usage of this response. >> >>Currently I believe we only return 502 in the initial banner or in response >>to a failed authentication; in both cases we close the connection (with FIN). > > Do you ever respond 502 to MODE READER? MODE READER is a no-op here; it always repeats the original 200 or 201 banner. (Our own code does not support doing transit and reader functionality on the same listening port, so the MODE READER issue does not apply.) >>Since authentication is an extension this does not strictly speaking >>conflict. > > That would depend on the specification of the authentication extension > you use. The correct action would be, in my opinion, to respond 480 to > everything until the authentication is retried successfully. There are a number of reasons not to permit repeated authentication attempts. One is to discourage brute-force attacks. Another is to reduce the possibility of server-side bugs such as the notorious Typhoon auth bug (which returned 502 responses to failed authentications but then allowed the client full access if it ignored the error). Still, this can be re-visited when looking at authentication extensions (at present we only support AUTHINFO USER/PASS). >>One other odd feature of our server: we return a 500 error and close the >>connection if the first command of a session appears to be an attempt to >>speak HTTP. > [...] >>This includes cases where the first command is "POST" - we check for the >>presence of HTTP-like arguments to distinguish this from legitimate use of >>the POST command. > > I would say this is non-conforming behaviour. > > It's a perfect example of when to use 400, I would say, since that > allows the connection to be closed immediately. If you aren't going to > close it, you should respond 500 to non-NNTP commands and 501 to POST. I guess 400 would work in that scenario, since there is no restriction on the circumstances in which the server can send 400. In practice it doesn't make much difference because an HTTP client will not see the response and an NNTP client will not trigger the error in the first place, so I can change this. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services
Technical Details
Message-ID:
<slrnbp40bc.2sl5.andrew+nonews@trinity.supernews.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!opentransit.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mailReferences:
<87fzhryxdc.fsf@windlord.stanford.edu> <slrnbp2c8b.2sl5.andrew+nonews@trinity.supernews.net> <uTJ89aeAzZk$EwQE@romana.davros.org>Show Full Headers
Complete Article Headers
Message-ID: <slrnbp40bc.2sl5.andrew+nonews@trinity.supernews.net> Subject: Re: New NNTP draft -- Sections 1-3 Date: Sun, 19 Oct 2003 03:13:51 -0000 From: Andrew - Supernews <andrew+nonews@supernews.com> References: <87fzhryxdc.fsf@windlord.stanford.edu> <slrnbp2c8b.2sl5.andrew+nonews@trinity.supernews.net> <uTJ89aeAzZk$EwQE@romana.davros.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!opentransit.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Newsgroups: news.software.nntp Organization: http://www.supernews.com - all your nntp are belong to us Reply-To: andrew@supernews.com User-Agent: slrn/0.9.7.4 (FreeBSD) X-Complaints-To: abuse@supernews.com Lines: 90