Article View: news.software.nntp
Article #62769Re: Power-Post 2003 - requesting input from authorities..
From: Kjetil Torgrim Homme
Date: Sat, 04 Jan 2003 15:34
Date: Sat, 04 Jan 2003 15:34
151 lines
6200 bytes
6200 bytes
[Kjetil Torgrim Homme]:
>
> [Kjetil Torgrim Homme]:
> >
> > [Jeremy]:
> > >
> > > No, I don't think that's right. xBin is about hashing files, not
> > > messages. What you want to be looking at to hash is one MIME
> > > entity.
> >
> > that would be nice.
>
> ah, this won't work -- you can't put headers in the middle of a
> MIME entity... this requires a new form of message/partial.
> ideas?
let's see:
single files:
plain uuencode or yEnc: no problem, we put it in the article
headers
MIME: we can do a slight layering violation and put it in the
article headers
multiple files:
plain uuencode or yEnc: it can be done, but I don't think we want
to support this. basically, the Content-SHA1-Tree must appear as
if it were plain text between files.
MIME: if each file fits within a part, we can put it in the entity
headers. if the files are small, we may even fit several files in
each part. the size of each part may thus vary wildly. if the
file needs to be split, we put the the first Content-SHA1-Tree in
entity headers and in the article headers for the other segments.
actually, it's probably best to use the multiple files mechanism even
for single files, the difference is so small, and it makes more sense.
here's an example of the multiple file case:
=== article 1 ===
Subject: foo [1/3]
From: friendly poster
Message-ID: <$UB$Hsomehash$Ssomesize$MC@somewhere>
MIME-Version: 1.0
Content-Type: message/partial; number=1; total=3;
id="somehash@somewhere"
Subject: foo
From: friendly poster
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=unlikelystring4711
--unlikelystring4711
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo-frontcover.jpg"
Content-SHA1-Tree: ....
DSdss234hjkfsd23....
--unlikelystring4711
Content-Type: audio/mpeg
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo-low.mp3"
Content-SHA1-Tree: the hash tree for the chunk in this article
ghjfsd98s2/jJsj2...
=== ends ===
I'll stop here to explain: the first stanza is the article headers.
when a message/related is assembled, that is thrown away, it only
keeps whatever is inside: the bodies of the message/related parts.
this is why some headers are replicated above: they become the headers
of the assembled full article.
next comes the multipart declaration. after each "unlikelystring4711"
we first have the entity headers, then the data in the entity.
=== article 2 ===
Subject: foo [2/3]
Message-ID: <$UB$Hsomehash$Ssomesize$Osomeoffset@somewhere>
MIME-Version: 1.0
Content-Type: message/partial; number=2; total=3;
id="somehash@somewhere"
Content-SHA1-Tree: the hash tree values for the chunk of
the MPEG sound file which is in this article.
fhsdjfdsjsfd...
=== ends ===
notice how part 2 contain no entity headers, just unadorned BASE64
data in its body.
=== article 3 ===
Subject: foo [3/3]
Message-ID: <$UB$Hsomehash$Ssomesize$Osomeoffset@somewhere>
MIME-Version: 1.0
Content-Type: message/partial; number=3; total=3;
id="somehash@somewhere"
Content-SHA1-Tree: the hash tree values for the chunk of
the MPEG sound file which is in this article.
jhDSsD10A/DHgghiqp....
--unlikelystring4711
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo-backcover.jpg"
Content-SHA1-Tree: the hash tree for this JPEG
pQ3d/dsmndDsdwEoi...
--unlikelystring4711
=== ends ===
note that the Content-SHA1-Tree in the article's headers only cover
the MP3, and the JPEG file following it can specify its own
Content-SHA1-Tree header in its entity headers.
this scheme is of course backwards compatible, and can be processed by
existing MIME clients.
the single file case is a little simpler:
=== article 1 ===
Subject: foo [1/3]
From: friendly poster
Message-ID: <$UB$Hsomehash$Ssomesize@somewhere>
MIME-Version: 1.0
Content-Type: message/partial; number=1; total=3;
id="somehash@somewhere"
Subject: foo
From: friendly poster
MIME-Version: 1.0
Content-Type: audio/mpeg
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo-low.mp3"
Content-SHA1-Tree: the hash tree for the chunk in this article
ghjfsd98s2/jJsj2...
=== ends ===
it's a bit annoying that the hashes for the first part won't be
available through HEAD, but it's not that important.
--
Kjetil T. | read and make up your own mind
| http://www.cactus48.com/truth.html
Technical Details
Message-ID:
<1risx5gc82.fsf@ellifu.ifi.uio.no>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!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.stueberl.de!newsfeed.vmunix.org!uio.no!nntp.uio.no!ifi.uio.no!not-for-mailReferences:
<cdda0v4h6t52ov7abf1j0qkpo843itf4se@4ax.com> <1rof6xiyow.fsf@ellifu.ifi.uio.no> <ylisx5y9h2.fsf@windlord.stanford.edu> <1rfzs9inbi.fsf@ellifu.ifi.uio.no> <1041678163.908321@ok-corral.gunslinger.net> <1rvg15gmnj.fsf@ellifu.ifi.uio.no> <1rn0mhglzx.fsf@ellifu.ifi.uio.no>Show Full Headers
Complete Article Headers
Message-ID: <1risx5gc82.fsf@ellifu.ifi.uio.no> Subject: Re: Power-Post 2003 - requesting input from authorities.. Date: Sat, 04 Jan 2003 15:34:53 +0000 From: Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> References: <cdda0v4h6t52ov7abf1j0qkpo843itf4se@4ax.com> <1rof6xiyow.fsf@ellifu.ifi.uio.no> <ylisx5y9h2.fsf@windlord.stanford.edu> <1rfzs9inbi.fsf@ellifu.ifi.uio.no> <1041678163.908321@ok-corral.gunslinger.net> <1rvg15gmnj.fsf@ellifu.ifi.uio.no> <1rn0mhglzx.fsf@ellifu.ifi.uio.no> 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!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.stueberl.de!newsfeed.vmunix.org!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail Newsgroups: news.software.nntp Organization: Dept. of Informatics, Univ. of Oslo, Norway Lines: 150 NNTP-Posting-Host: ellifu.ifi.uio.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: maud.ifi.uio.no 1041694494 9333 129.240.65.211 (4 Jan 2003 15:34:54 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 4 Jan 2003 15:34:54 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7