Article View: news.software.nntp
Article #80532Re: Questions about datastream answers (especially to TAKETHIS)
From: Curt Welch
Date: Thu, 09 Apr 2009 19:11
Date: Thu, 09 Apr 2009 19:11
93 lines
6619 bytes
6619 bytes
Julien_ΓLIE <iulius@nom-de-mon-site.com.invalid> wrote:
> Hi Russ,
>
> >> The solution you suggest is the cleanest thing to do and complies with
> >> RFCs. The only issue is that it is not documented ("501 bad-mid" is
> >> both not forbidden and not mentioned).
> >>
> >> Should we go on that way?
> >
> > It makes me a little uneasy, since 501 is really the correct response,
> > but I can see the justification for it. I wonder if anyone else has an
> > opinion on what should be done in this corner case.
>
> More a hack than anything else but if we have received "CAPABILITIES"
> previously in the session, we send "501 the whole byte string"
> (RFC-compliant); otherwise, "439 the whole byte string" (not
> RFC-compliant).
>
> But well, it is not very proper...
>
> In both cases, RFC 4644 needs an addendum to say:
> * either that generic responses will include that byte string (which can
> be a well-formed message-ID for instance after 480, 483, etc.);
> * or that 438/439 is always sent in such cases and that their answer is
> always the whole byte string.
>
> I would of course prefer the first one.
>
> And we still do not handle the case of a "whole byte string" whose size
> is greater than the maximum allowed (for instance 600 bytes -> we must
> truncate it after 501 or do something else).
>
> Or it can also be assumed that RFC 4644 does not need an addendum and is
> well as-is, which is fine except for the absence of message-ID (the
> client will not know which command has triggered the problem). This
> solution, as well as the first one, still has the disadvantage of not
> being compatible with current NNTP implementations :-/
> And the second solution, though fine with current implementations,
> prevents the use of useful code responses.
Ok, so I'm jumping in to this thread late, and haven't read the rest of the
responses yet.
My thought is that it's very wrong to assume the client needs the
message-id argument in order to correctly match up a response with commands
sent. It just doesn't need them. The correct way to write a client is to
queue up the commands and match the responses to the commands as they come
back. It's rival to code. At the same time, the server must keep track of
what has been sent, but not responded to, so that it can correctly re-queue
articles in the case of a dropped connection. So if you get a 5xx response,
you know something has gone wrong and you know which article it was for and
the client shouldn't try to resend.
I've not read the current RFCs but I hope the protocol hasn't been broken
by the new RFC allowing the response to come back out out of order.
The reason one would choose not to code it correctly like that, is because
they don't care to correctly handle errors. And if they don't care to
correctly handle errors, then it really makes little difference what you
send back to them. They have probably written the code to do something
simple like never retry (spam injector or other stupid client), or they
simply retry everything that is not accepted or rejected a few times, and
then give up and simply ignore all other returns.
I would actually vote for NOT sending the message-id back with the response
on any of the commands to prevent people from being sloppy in the coding
(if such an option was possible to vote for which it is not at this point).
I hav no issue at all with sending 5xx codes back (without the Message-ID
argument) for all errors. I actually think it's far more useful to put a
descriptive error (what the error was) on the 5xx code than to replace a
useful message with the mostly useless and redundant Message-ID. There are
a ton of reasons why a TAKETHIS my be considered invalid. Such as the
invalid Message-ID syntax or size, or the command being too long. Or what
do you do when the Message-ID in the article sent doesn't actually match
what was in the article that was sent? Or if the article itself has major
format issues, like a Missing Message-ID, or dup Message-IDs?
Those issues show up when transit servers have disk corruption issues and
they end up sending garbage for an article. If you respond with a 5xx code
with an argument saying "Missing message-id in article", it's more likely
that error ends up the log file of the sending server, and helps the admin
on the sending side realize he's got an corruption problem than if you
silently reject the article with a 4xx code or reject it with a 5xx code
with nothing but a Message-ID argument.
Again, I've not read the RFCs so I'm not making an argument about how all
this is specified in the RFC (since I don't know), but just talking from
practical experience of writing servers and making them work.
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com http://NewsReader.Com/
Technical Details
Message-ID:
<20090409151121.399$6P@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.20141118.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!transit3.readnews.com!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr5-q1.newsreader.com.POSTED!not-for-mailReferences:
<gq0tnk$kp3$1@news.trigofacile.com> <877i2knd8m.fsf@windlord.stanford.edu> <gq10do$n5p$1@news.trigofacile.com> <87ab7fnbjk.fsf@windlord.stanford.edu> <gq18h4$un2$1@news.trigofacile.com> <87wsajk9lu.fsf@windlord.stanford.edu> <gq273p$s8o$1@news.trigofacile.com> <87k56iip3i.fsf@windlord.stanford.edu> <gq5813$nhj$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <20090409151121.399$6P@newsreader.com>
Subject: Re: Questions about datastream answers (especially to TAKETHIS)
Date: Thu, 09 Apr 2009 19:11:19 +0000
From: curt@kcwc.com (Curt Welch)
References: <gq0tnk$kp3$1@news.trigofacile.com> <877i2knd8m.fsf@windlord.stanford.edu> <gq10do$n5p$1@news.trigofacile.com> <87ab7fnbjk.fsf@windlord.stanford.edu> <gq18h4$un2$1@news.trigofacile.com> <87wsajk9lu.fsf@windlord.stanford.edu> <gq273p$s8o$1@news.trigofacile.com> <87k56iip3i.fsf@windlord.stanford.edu> <gq5813$nhj$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.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!transit3.readnews.com!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr5-q1.newsreader.com.POSTED!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-NRC-Trace: NewsReader.Com 1t2yVv9ui5MGh-@y9Ld2hDA4KdDyGaw_XO5DCbOXXhaM/9
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-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 93
NNTP-Posting-Host: 305699f8.nr5-q1.newsreader.com
X-Trace: DXC=2`ZOkCGMBiiHEN?7eZd>5lbgZaH`e<A[iZ?:i9<JJBSnRgB7S^KG5DoiJ;
iV2YAoGe7a<khdJH?nmh@i:Yg3>4Mb
X-Complaints-To: abuse@newsreader.com
X-Original-Bytes: 6338