Article View: news.software.nntp
Article #59516Re: News servers, nntpcache, slrn and the Usenet bug "From ".
From: Curt Welch
Date: Sun, 07 Jul 2002 19:39
Date: Sun, 07 Jul 2002 19:39
51 lines
4099 bytes
4099 bytes
nenosed@apex.met.au wrote:
> I've twice asked which RFC's are relevant, and not seen an answer to
> that.
Usenet is not like most of the Interenet. It's not really defined in the
RFCs. It's defined by common use. The RFCs mostly are just attempts to
document common use - and sometimes an attempt to change common use. Most
attempts to change Usenet by writting RFCs have failed however.
For a good collection of the all the RFCs related to Usenet and a
ton of disccussins about what people think it "should be", you should check
out the USEFOR page:
http://www.landfield.com/usefor/
> I *would* like to make article detection bullet-proof, or as near
> to that as possible, but if I can't get better info than I've got so far,
> I'll just continue with the algorithm I'm using at present. It works.
I'm sorry, but I don't understand your problem. If you are storing Usenet
articles to mbox format files, the algorithm is bullet-proof. You read
lines from the file and any line begining with "From " is the beginning of
a new article. It's bullet-proof and simple as hell. But you do get the
unfortunate side effect that articles will be corrupted if you try to save
them that way (From chagned to >From and line termination issues etc).
If you want to save articles with no corruption, you need to use a better
storage format.
If you are reading your articles from an NNTP server, the article is
defined to be everything that comes back from the server after the CR LF on
the command status line, up to but not including the DOT CR LF which ends
the article. And you have to reverse the dot stuffing of course as well by
removing the DOT from the beginning of all lines.
Understanding what those bytes mean is another matter, but reading the
bytes and saving it to a file without corruption is not hard.
One bullet-proff format I've used to save multiple articles to a single
file is to simply write them in NNTP wire format and include the trailing
DOT CR LF as well. When you do this, you can read the articles byte for
byte as they were sent to you from the NNTP server and know for sure where
each article begins and ends without having any issues of corruption.
Dot stuffing and unstuffing opens the door for corruption between the save
and the re-transmit which can be avoided with the above technique.
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20020707153953.823$CD@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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<slrnaiaghh.333.nenosed@arthur.valhalla.net.oz> <87eleisdsw.fsf@erlenstar.demon.co.uk> <slrnaib0fg.3b6.nenosed@arthur.valhalla.net.oz> <DNhV8.6017$xf3.1063173@news11-gui.server.ntli.net> <slrnaibc7b.3hu.nenosed@arthur.valhalla.net.oz> <1rlm8q2ots.fsf@vingodur.ifi.uio.no> <slrnaictt1.4d2.nenosed@arthur.valhalla.net.oz> <ylfzyxl9fx.fsf@windlord.stanford.edu> <slrnaid18u.4d2.nenosed@arthur.valhalla.net.oz> <1fewjzr.f4w0w51pfr20yN%planB@newsreaders.com> <slrnaigj8g.600.nenosed@arthur.valhalla.net.oz>Show Full Headers
Complete Article Headers
Message-ID: <20020707153953.823$CD@newsreader.com>
Subject: Re: News servers, nntpcache, slrn and the Usenet bug "From ".
Date: Sun, 07 Jul 2002 19:39:53 +0000
From: curt@kcwc.com (Curt Welch)
References: <slrnaiaghh.333.nenosed@arthur.valhalla.net.oz> <87eleisdsw.fsf@erlenstar.demon.co.uk> <slrnaib0fg.3b6.nenosed@arthur.valhalla.net.oz> <DNhV8.6017$xf3.1063173@news11-gui.server.ntli.net> <slrnaibc7b.3hu.nenosed@arthur.valhalla.net.oz> <1rlm8q2ots.fsf@vingodur.ifi.uio.no> <slrnaictt1.4d2.nenosed@arthur.valhalla.net.oz> <ylfzyxl9fx.fsf@windlord.stanford.edu> <slrnaid18u.4d2.nenosed@arthur.valhalla.net.oz> <1fewjzr.f4w0w51pfr20yN%planB@newsreaders.com> <slrnaigj8g.600.nenosed@arthur.valhalla.net.oz>
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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp,news.software.readers
X-Trace: NewsReader.Com KEYyAM6EEbGata1h3uiFkQ41_vy6@hLFORsY9Z9fMVU1cMH1D
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: 50