🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #53301

Re: How do you locate all the files in a multi-part message?

#53301
From: Curt Welch
Date: Sun, 15 Jul 2001 18:53
150 lines
8566 bytes
archiver@i3w.com (The Archiver) wrote:
> those who know me have no need of my name <not-a-real-address@usa.net>
> wrote:
>
> >actually there is one reliable way, mime message/partial, unfortunately
> >most posters don't use it.

> Most users are downloading headers today - and the newsreader tries
> to combine multiparts from the XOVERview.
>
> How is MIME better than UUencode in this case ?

I don't know if they addressed that.  I suspect they didn't.  But to
be honest, I've never read the MIME standard on that, I've only seen
a few examples.

The big problem is that it's not backward compatible with what everyone
is already doing.  And because of the XOVER needs os Usenet, I don't
think it even works as well, so that' why we are not seeing people
switching to it.  I'm guessing the MIME guys were stuck in their "e-mail"
frame of reference and assuming that all the articles would be downloaded
first, and then you look at the headers to try to match them up.  Or maybe
they just wrote-off the XOVER issue and decided news needs to fix xover
to include the mime headers?  who knows.

> My latest plans are to extend the subject line by additional information:
>
> Subject:  <comment>
>                '{' <filename> '}'
>                '(' <partnr> '/' <totalparts>')' <size> bytes
>                '[' <crc32> ','<byte#> '-' <byte#> ']'
>                <comment2>

Those are interesting ideas, but it will break most current decoders.  They
all expect the rest of the subject (besides the N/N numbers) to be the same
for all the articles.  If you add anything to the subject that's not the
same across the entire set, it won't be compatible with todays decoders (I
assume - I know it will break mine at least).  Also, putting all those
numbers after the (N/N) marker might confuse some of them as well.
Especially the "byte-byte" number stuff.  Some scaners might be looking for
a dash as an optional /.

The trick is to create new standards that are backward compatible with
todays standards. If you create a new on which isn't compatible, then it's
not likely to become a standard just like the mime multipart standard.

If you want to be compatible with todays download tools, then you need to
put all that extra information elsewhere in the header instead of the
subject.  Then your download tool can simply do a HEAD command on the first
article in the set.  If if finds the "extra" info it's looking for in the
header, then it knows to expect to find that in all the articles of that
set.  It can then do a head on all the articles in the set to make sure
that 1) they are really on the server (servers which lie in xover about
what's really available, don't normally lie with HEAD commands), 2),
collect all the extra data like above to make sure you have the correct
parts.

What you need to add to the header would include a unique identifier for
the entire site -- the message-ID of the first article could work, but that
might be a bad convention to start because there is at least one server
that doesn't let the client create their own ID.  So if the upload tool
simply created a new Message-ID to identify the set, and put that in the
header of every article, that would be very useful.  Something like:

   Multipart-ID: <ksks@ksksk> (034/121)

A repost of a missing part should include the same Multipart-ID: as the
orginal.  A repost of the entire set would have a new Multipart-ID, unless
the repost turely was a re-post and each part was exactly the same as the
first time it was posted.

This header works nicely for all forms of multipart articles - including
ones that have no files at all -- just very large text postings (faqs) ,
and ones that include multiple files split strangly across the article
boundries.

For multipart posts which only contain one large multipart file, then you
can add the other headers.

The filename could be put in a a header.  I think I would tend to put this
in a header by itself to prevent any issues on how to parse the filename:

   Multipart-File-Name: Song 3-4 by so and so.mp3

And the filesize:

   Multipart-File-Size: 4323956

A hash of the entire file would be a nice optional feature to include when
possible.  This is a good way to know that two different posts are really
the same file, which gives you options to not download files you aready
have, and to check the file once it's downloaded to before everything
worked correctly, but even better - to be able to put togeher missing
pieces of your previous download from a repost even though the repost was
posted with different line counts.  That would be done with the help of the
byte range info below.  But for large files, it might be a pain for some
posting agents to have to scan the entire file and calculate this before it
starts the post, so it would be optional.

   Multipart-File-Hash: md5 e19c1283c925b3206685ff522acfe3e6

The crc and byte range of the current part would be put in a different
header to allow more verification that this was really the part you were
looking for, and to verify that you got valid data after the download:

   Multipart-File-Segment: <first byte offset>-<last byte offset> <crc32>

And it would allow you to pick out just the parts you needed in a repost
to fill your gaps from a previous post.  So someone could post a 200 part
file once, but because he got lots of repost requests, he might repost
it as a 800 part post - but with the hash and byte range headers, your
download tool could find and download only the pieces of that repost
which were needed to fill the gaps you missed in the first post.

The Subject should simply follow the current standard today, which in my
mind are:

    Subject: <comments> filename (nn/NN)

You should never add comments after the (nn/nn) in my mind.

With the above type of headers added to multipart posts, a download client
only needs to use XOVER to locate and match up segments just like it works
now.  It would then do a HEAD command for the first article in each segment
to see if there was more info available.  That one HEAD command of the
first article in the set (even if only articles 10-28 were curretly on the
server), would tell it everything it needed to know to show the user what
was on the server to download.

Before it started to actaully download any segment, it would do head
commands on all the articles in the set first to verify they were their and
that they were the correct articles.

With the above headers, it would be very easy to create automated download
tools that were smart enough to "fill" holes in previuos downloads with no
assistance of the user.  If anyone re-posted the same file again, even in
different sized segments, the tool would spot it and download the missing
chunks.

You could even explore the option of having automated re-post requests
which includes detailed headers about what files and byte ranges people
were looking for.  Then, anyone that had the file (with the matching
md5 hash) could repost the missing byte ranges and even break the reposted
segments into small chunks this time to increase the probability that they
will make it through.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20010715145321.282$q3@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!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!feed1.newsreader.com!feed.newsreader.com!news2.newsreader.com!flame.newsreader.com!not-for-mail
References: <VBu37.1535$XT4.865950@typhoon.ne.mediaone.net> <9irh5v31h16@enews1.newsguy.com> <1226b.f71201@archiver.winews.net>

Show Full Headers
Complete Article Headers
Message-ID: <20010715145321.282$q3@newsreader.com>
Subject: Re: How do you locate all the files in a multi-part message?
Date: Sun, 15 Jul 2001 18:53:21 +0000
From: curt@kcwc.com (Curt Welch)
References: <VBu37.1535$XT4.865950@typhoon.ne.mediaone.net> <9irh5v31h16@enews1.newsguy.com> <1226b.f71201@archiver.winews.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.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!feed1.newsreader.com!feed.newsreader.com!news2.newsreader.com!flame.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com cQP@CiD1K_DC3-x91uiSx3It@lQ@JoyWE@sye+QjqV2Bt@
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: 149