Article View: news.software.nntp
Article #64723Re: Standardization of LIST OVERVIEW.FMT
From: Russ Allbery
Date: Thu, 03 Apr 2003 04:11
Date: Thu, 03 Apr 2003 04:11
88 lines
5609 bytes
5609 bytes
Curt Welch <curt@kcwc.com> writes:
> Is it because I didn't follow the RFC when I wrote my code or is it
> because the RFC wasn't detailed enough about this point I wonder?
RFC 1036 is pretty explicit about requiring the space, but your parser can
also handle RFC 2822 messages, which is useful.
> Yeah, at the NNTP level, the problem here is that you can transfer
> articles with a header like of "Crap:out" so what should an nntp server
> do if it receives an article with a header line like that?
Yup.
We don't want to limit NNTP to just RFC 1036 articles, either, since it
can handle other things. So so far in the new standard, we're just
bailing and saying "here are some things that are fundamental about
articles from an NNTP standpoint; the rest is up to whatever article
format you want to comply with."
> If that is not a valid header line period, should the entire article
> always be rejected as totaly invalid? If, like in the Crap:out example,
> the header is not important, should it just be ignored?
I think ignoring the headers is a bad idea, since you're still giving it
to a client with that header in there. I think that if you decide the
message is invalid, just rejecting the whole thing is the best way to go.
> Because NNTP specifies how data is transfered, and also specifies how to
> deal with headers, it seems to me the NNTP RFC should be _very_ precise
> on how the dot terminated data is parsed to find the headers and header
> data,
I think that's in there.
> and for parse errors, I think it should be _very_ precise about how to
> react to a basic parse error (this missing space issue, any line length
> issues if there are any limits, any max header size after folding
> issues, NULLs, lone CRs and LFs) in regards to the header parsing
> algorithm.
I'm not quite sure what you want here; if the message doesn't parse, it's
not valid input.
> For the missing space issue, I think the RFC should be very precise
> about how it should be delt with.
This is getting into quality of implementation issues, which I don't think
really belong in a wire protocol document. That's not the sort of thing
that standards address; if you look at a whole bunch of IETF standards,
you won't find things like precise specification of error handling of
syntactically invalid input in many of them. The standard specifies what
is valid input and what to do with valid input; if you send invalid input,
that's outside the scope of the standard other than specifying error codes
that you can use.
I don't want to put into a standard that you have to reject a message for
such a reason. You may not want to do so, and it doesn't matter from a
protocol standpoint if you reject it or not. What does matter from a
protocol standpoint is that when a client sends ARTICLE, it needs to get a
well-formed message back. (And USEFOR will put limits on what sorts of
changes a Usenet transit server is permitted to make to articles that are
passing through.)
> That's a reasonable approach, and I'm searching my spools and so far
> have not found a single article with a missing space after the : for any
> header line, so it may be a universial assumption (outside my server).
> But I think the NNTP RFC should be very clear about what is and is not a
> "syntactially valid" article to the level of how to parse headers so you
> can be very precise about how it reacts to these articles and what it
> will produce for OVER and HDR data etc.
> The NNTP RFC should not try to include the full USEFOR problem, but it
> should include enough of this issue to make it precisely clear how the
> server finds headers and what is valid and what is not and how it should
> react to it. It seems to me that this can be done at this level without
> getting tangled up in the USEFOR problems.
We're adding a section to deal with some of this stuff; I think the best
thing to do would be to finish that and then see what you think of the
result.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<ylhe9g6wzv.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailReferences:
<ylhe9j13ly.fsf@windlord.stanford.edu> <20030401000349.361$y1@newsreader.com> <ylk7eeyex4.fsf@windlord.stanford.edu> <20030401162641.836$2c@newsreader.com> <yl4r5h4d2g.fsf@windlord.stanford.edu> <20030402212438.619$bH@newsreader.com> <ylbrzo1f78.fsf@windlord.stanford.edu> <20030402220449.560$Fb@newsreader.com> <ylbrzo8ee7.fsf@windlord.stanford.edu> <20030402225212.984$Db@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <ylhe9g6wzv.fsf@windlord.stanford.edu> Subject: Re: Standardization of LIST OVERVIEW.FMT Date: Wed, 02 Apr 2003 20:11:32 -0800 From: Russ Allbery <rra@stanford.edu> References: <ylhe9j13ly.fsf@windlord.stanford.edu> <20030401000349.361$y1@newsreader.com> <ylk7eeyex4.fsf@windlord.stanford.edu> <20030401162641.836$2c@newsreader.com> <yl4r5h4d2g.fsf@windlord.stanford.edu> <20030402212438.619$bH@newsreader.com> <ylbrzo1f78.fsf@windlord.stanford.edu> <20030402220449.560$Fb@newsreader.com> <ylbrzo8ee7.fsf@windlord.stanford.edu> <20030402225212.984$Db@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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 87 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1049343092 17821 171.64.13.23 (3 Apr 2003 04:11:32 GMT) X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Portable Code, sparc-sun-solaris2.6) Cancel-Lock: sha1:I2cW3sMqd+NadzWJDvMaxixqtVg=