Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Metalinker.org (XML for describing downloads: mirrors, checksums, etc) support in Firefox?

5 views
Skip to first unread message

news.mozilla.org

unread,
Feb 5, 2008, 3:36:19 PM2/5/08
to
.metalinks are simple XML files that list download info like mirrors and
checksums. how/where would one go about adding support in Firefox?

my idea would be to progress like this:

0) Download the .metalink file
1) Process .metalink XML file and download from one URL for each <file>
2) Verify whole file checksum
3) Verify each chunk with chunk checksums; re-download error chunks
4?) Multi-source downloads: use multiple mirrors to download one file

I'm assuming reading the XML and doing a checksum of the whole file
would be possible & quite easy considering Firefox's current features.
what about checksumming just part of the file. I know Firefox doesn't
support multi-source downloads, that's not a required feature.

the metalink bug is https://bugzilla.mozilla.org/show_bug.cgi?id=331979

thanks for any help! Mozilla people are more than welcome to join in
with ideas & suggestions for metalink too.

(( Anthony Bryan ... Metalink [ http://www.metalinker.org ]
)) Easier, More Reliable, Self Healing Downloads

here's more info too:
----

Metalink is a cross-platform and cross-application open
standard/framework/file format for programs that download, including
download managers, BitTorrent clients, Web browsers, FTP clients, and
P2P programs. 30+ apps support it, including KGet in KDE 4.0 and
DownThemAll 1.0 beta (Firefox extension). Metalink is frequently used
for large file downloads like ISOs, for adding multiple files to a
download queue, or for automatic file verification or repair of errors
during downloads.

For increased convenience, it stores the multiple download locations
for a file (FTP/HTTP/P2P) in a single metafile with the extension
.metalink. This provides reliability in case one method fails. It can
also be used for multi-source downloads. Metalink supports listing
multiple partial and full file checksums along with PGP
signatures.

Here's a screenshot of a Ubuntu ISO metalink about to be downloaded
with DownThemAll: http://www.metalinker.org/images/dta_ubuntu.png

An example .metalink file:

<?xml version="1.0" encoding="UTF-8" ?>
<metalink version="3.0" xmlns="http://metalinker.org">
<files>
<file name="example.ext">
<verification>
<hash type="md5">example-md5-hash</hash>
<hash type="sha1">example-sha1-hash</hash>
</verification>
<resources>
<url type="ftp" location="us"
preference="90">ftp://ftp.example.com/example.ext</url>
<url type="ftp" location="uk"
preference="90">ftp://ftp.example.net/example.ext</url>
<url type="http" location="us"
preference="90">http://example.com/example.ext</url>
<url type="http" location="de"
preference="90">http://example.net/example.ext</url>
<url type="bittorrent"
preference="100">http://example.org/example.ext.torrent</url>
</resources>
</file>
</files>
</metalink>

Those interested, please check out the site at
http://www.metalinker.org/ and our discussion mailing list at
http://groups.google.com/group/metalink-discussion

Shawn Wilsher

unread,
Feb 6, 2008, 2:46:24 PM2/6/08
to Edward Lee
> 0) Download the .metalink file
Should be easy - especially if it's user initiated.

> 1) Process .metalink XML file and download from one URL for each <file>
I'm pretty sure you can register a handler for a given mime-type, so
the first part is easy.

The second part can be accomplished with the download manager I'd
imagine.


> 2) Verify whole file checksum

I think Edward Lee did something like this (Mardak on irc)


> 3) Verify each chunk with chunk checksums; re-download error chunks

Same as above


> 4?) Multi-source downloads: use multiple mirrors to download one file

Not sure how doable this is.

Cheers,

Shawn Wilsher

avmu...@gmail.com

unread,
Feb 11, 2008, 3:37:40 PM2/11/08
to
I am currently working on metalink support for firefox.
Currently firefox is accessing the .metalink file using a mime type of
application/plain.So, to download the .metalink file we should change
the mime type of that file to application/octet-stream.Can i know how
can the mime type of a file be changed by firefox (i.e in the mozilla
codebase) so that the metalink file could be downloaded to the local
disk for further processing?

avmu...@gmail.com

unread,
Feb 11, 2008, 4:54:50 PM2/11/08
to
* application/plain should be text/plain

Ant Bryan

unread,
Feb 12, 2008, 4:38:58 PM2/12/08
to

thanks for the info, Shawn.

it's good to know what's possible and what might not be. multi-source
downloads aren't important.

Ant Bryan

unread,
Feb 29, 2008, 4:27:48 PM2/29/08
to
DownThemAll 1.0 final has been released with great Metalink support.
Please check it out!

http://www.downthemall.net/
http://www.metalinker.org/

Ant Bryan

unread,
Jun 25, 2008, 5:37:38 PM6/25/08
to
(From my biased position) I would like to see Metalink support in
Firefox 3.1 or 4, whatever is possible, and I'm willing to fund work on
it if needed. I am also interested in comments from people at Mozilla on
what could be improved and issues they may have with it.

I'm told to be included it would probably need to get the support of
either the Firefox module owner (mconnor) or the Toolkit module owner
(bsmedberg).

Popular Linux distributions like openSUSE and Ubuntu are making use of
Metalink:

http://download.opensuse.org/distribution/11.0/iso/cd/
http://releases.ubuntu.com/8.04/

Metalink can be tested out with the DownThemAll! Firefox Addon and about
20 other download programs:

http://www.downthemall.net/

Thanks for your time everyone!

--

(( Anthony Bryan ... Metalink [ http://www.metalinker.org ]
)) Easier, More Reliable, Self Healing Downloads

0 new messages