http://curl.haxx.se/mail/archive-2008-12/att-0041/curl-7.19.2-metalink.patch
From: Tatsuhiro Tsujikawa
Date: Sat, 13 Dec 2008 00:31:29 +0900
Hi,
I made a patch to add very basic Metalink support to curl command-line
tool. The patch is made against curl-7.19.2. Although the patch is still
rather experimental, it provides basic fail over functionality.
Libmetalink library is used to parse Metalink XML file. I added
configure option for it in configure.ac.
Libmetalink is hosted at https://launchpad.net/libmetalink and there are
ubuntu package: https://launchpad.net/~bneijt/+archive
I added --metalink option which takes Metalink XML filename. If it is
given, curl parses the file and retrieves available URI.
If a problem occurs in a URL, curl tries next URL. In other words, it
currently supports fail over functionality.
I'm also planing to add checksum validation function.
While testing some metalinks, I found that I have to pass at least 2
arguments other than --metalink to get it work with Metalink: -C -, -f.
"-C -" is needed to continue the failed download. "-f" is needed to
avoid the curl to exit when it encounters error like 404(hmm, maybe -f
option can be omitted with further hacks).
For storing multiple URLs, I added alternate_url to struct getout.
alternate_url is a pointer to the array of URLs. In metalink download,
alternate_url is used instead of url member.
In order to use next URL when current URL is failed, I hacked 2nd URL
globing loop to iterate alternate_url. Because I thought Metalink file
really contains URLs need to be globed, I turned off URL globing in this
loop, but it may look a little bit ugly. Is there any good place to
iterate URLs for fail over?
Best regards,
Tatsuhiro Tsujikawa
--
(( Anthony Bryan ... Metalink [ http://www.metalinker.org ]
)) Easier, More Reliable, Self Healing Downloads
From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 12 Dec 2008 11:45:15 -0800
On Sat, Dec 13, 2008 at 12:31:29AM +0900, Tatsuhiro Tsujikawa wrote:
> I made a patch to add very basic Metalink support to curl command-line
> tool. The patch is made against curl-7.19.2. Although the patch is still
> rather experimental, it provides basic fail over functionality.
This is a neat patch, but IMHO it doesn't belong in the curl command line
client. It adds functionality that goes well beyond what curl is designed
for and the UNIX philosophy behind it: to do one thing and do it well,
which is to transfer individual URLs from/to individual sites
and to allow all manner of tweaking that behaviour. That's why it
doesn't do HTML parsing, remote URL globbing, recursive transfers,
PAC proxy configuration, etc.
Metalink support is designed for something other than what curl's primary
mission is about. An indication of this is that of curl's 128 options, half
become irrelevant (and even more are marginally relevant) when doing
Metalink transfers. Adding two additional library dependencies to curl
is also an issue.
A curl-based Metalink downloader is a great idea, but as a separate program.
Of course, JMOOC, YMMV.
>>> Dan
From: Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com>
Date: Mon, 15 Dec 2008 00:55:29 +0900
Hi,
Dan Fandrich wrote:
> This is a neat patch, but IMHO it doesn't belong in the curl command line
> client. It adds functionality that goes well beyond what curl is designed
> for and the UNIX philosophy behind it: to do one thing and do it well,
> which is to transfer individual URLs from/to individual sites
> and to allow all manner of tweaking that behaviour. That's why it
> doesn't do HTML parsing, remote URL globbing, recursive transfers,
> PAC proxy configuration, etc.
>
> Metalink support is designed for something other than what curl's primary
> mission is about. An indication of this is that of curl's 128 options, half
> become irrelevant (and even more are marginally relevant) when doing
> Metalink transfers. Adding two additional library dependencies to curl
> is also an issue.
>
Hmm, it seems Metalink concept is an upper layer of what curl does.
If curl's mission objective includes UNIX philosophy, then it may not be
a good idea to include Metalink support in curl.
> A curl-based Metalink downloader is a great idea, but as a separate program.
> Of course, JMOOC, YMMV.
>
Do you think it is better to create, for example, a external script to
read Metalink and fed URL to curl?
Best regards,
Tatsuhiro Tsujikawa
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 14 Dec 2008 20:02:53 +0100 (CET)
On Fri, 12 Dec 2008, Dan Fandrich wrote:
> This is a neat patch, but IMHO it doesn't belong in the curl command line
> client.
I think this is a philosophical dilemma: I agree that curl itself is not
really (traditionally) about doing stuff on top of the supported protocols,
but yet there are such systems that are clearly transport-related "systems"
that add value for transports that are exactly this. I then think of not only
metalink, but also bittorrent and probably other things.
I would personally like a transfer tool like curl that also supports these
"ontop" layers, even though they're strictly speaking above the "application
layer". I can see how I can either build my own build of curl that supports
these, or we could perhaps try to more officially work on a second tool that
is a curl++ (or perhaps durl ;-) which adds more on top of what the existing
curl does and works with.
I can't say I've made up my mind over how I'd like it to end up, but I do know
that I like metalink and bittorrent as download "helpers"...
--
/ daniel.haxx.se
From: Anthony Bryan <anthonybryan_at_gmail.com>
Date: Sun, 14 Dec 2008 14:53:22 -0500
> Message: 3
> Date: Fri, 12 Dec 2008 11:45:15 -0800
> From: Dan Fandrich <dan_at_coneharvesters.com>
> Subject: Re: Patch for Metalink Support
> To: curl-users_at_cool.haxx.se
> Message-ID: <20081212194513.GB12193_at_coneharvesters.com>
> Content-Type: text/plain; charset=us-ascii
>
> On Sat, Dec 13, 2008 at 12:31:29AM +0900, Tatsuhiro Tsujikawa wrote:
>> I made a patch to add very basic Metalink support to curl command-line
>> tool. The patch is made against curl-7.19.2. Although the patch is still
>> rather experimental, it provides basic fail over functionality.
>
> This is a neat patch, but IMHO it doesn't belong in the curl command line
> client. It adds functionality that goes well beyond what curl is designed
> for and the UNIX philosophy behind it: to do one thing and do it well,
> which is to transfer individual URLs from/to individual sites
> and to allow all manner of tweaking that behaviour. That's why it
> doesn't do HTML parsing, remote URL globbing, recursive transfers,
> PAC proxy configuration, etc.
Dan, thanks for taking the time to check out the patch.
obviously, your opinion is valued here. I understand where you're coming from...
the philosophy behind Metalink is that we want a download to succeed
if there is any way possible for it to. if a server goes down, switch
over to another. if there's an error in transfer, detect it and
re-get that chunk, etc.
where curl may be for tweaking & manual options galore, we want people
to have an error free completed download with no thought or
intervention necessary. :)
perhaps Metalink doesn't mesh up w/ curl. like you said, we're
different, but maybe there's a place where we intersect. maybe
metalink falls into "a busload of other useful tricks" category, from
the description of curl on the site.
as much as I'd like to see it in curl, I hope this isn't a round peg,
square hole deal. I think it'd be useful to some people. but I could
be wrong.
Daniel Stenberg has also blogged about this and added to the feature
bounty: http://daniel.haxx.se/blog/2008/11/09/metalink-in-curl-bounty/
> Metalink support is designed for something other than what curl's primary
> mission is about. An indication of this is that of curl's 128 options, half
> become irrelevant (and even more are marginally relevant) when doing
> Metalink transfers. Adding two additional library dependencies to curl
> is also an issue.
a great point! as I stated above, Metalink does aim to simplify
things. this may be different from curl's primary mission, but if curl
can also offered simplified completed transfers in many cases, then
that could be nice too.
I don't know what can be done about the two additional libraries, &
agree that's an issue.
> A curl-based Metalink downloader is a great idea, but as a separate program.
> Of course, JMOOC, YMMV.
Metadl ( http://hampus.vox.nu/metadl/ ), used in Wubi by Ubuntu is one
such Metalink downloader that uses libcurl.
--
(( Anthony Bryan ... Metalink [ http://www.metalinker.org ]
)) Easier, More Reliable, Self Healing Downloads
Can I say "I told you so" or will I get flamed?
no flames :)
it's kinda confusing when Daniel, curl author, writes
"The Metalink guys host a list of project ideas and one of those ideas
is to add metalink support to curl, and I recently bumped the stakes a
bit by raising the bounty with an additional 200 USD so that the offer
is now 500 USD for the person or team that brings the feature as
described.
My primary motivation for doing this is that I like the metalink idea
and I'd like to help making sure it gets used more widely."
http://daniel.haxx.se/blog/2008/11/09/metalink-in-curl-bounty/
Daniel Stenberg wrote:
> On Sat, 13 Dec 2008, Tatsuhiro Tsujikawa wrote:
>
> I would like to play around with this patch and functionality a bit, but I have an initial request:
>
> I'd like this patch to have as low impact as possible on the existing code so I would really like to see perhaps a separate file added with the necessary metalink support functions or similar, so that all devs and users who don't care for metalink wouldn't have to see many traces of it.
>
OK. In my first patch, all metalink functions were integrated in
main.c. I'll make new patch that call metalink function in another
file after options are parsed.
Best regards,
Tatsuhiro Tsujikawa
On 2月6日, 午前1:19, Anthony Bryan <anthonybr...@gmail.com> wrote:
> good news?
>
> Date: Wed, 4 Feb 2009 23:10:15 +0100 (CET)
> From: Daniel Stenberg <dan...@haxx.se>
> Subject: Re: Patch for Metalink Support
> To: the curl tool <curl-us...@cool.haxx.se>
>> Message-ID: <alpine.DEB.1.10.0902042227120.2058@yvahk2.pbagnpgbe.fr>
> To post to this group, send email to metalink-discussion@googlegroups.com
> To unsubscribe from this group, send email to metalink-discussion+unsub...@googlegroups.com
Hi friends
As we've now gotten rid of the release, we once gain open the flood gates for
new features to enter. We will now allow new features getting in during the
coming month.
I especially want to point out and work with the following features to get
merged soon:
1 - the new auth callback for libcurl, by Joe Mason
2 - metalink support for curl, by Tatsuhiro Tsujikaw (note that this is not
for libcurl)
3 - schannel support for libcurl, by Marc Hoersken
... but I'm not closing the door for others or other features, so please show
us what you have as soon as possible if you want it get merged for the next
release.
Thanks for flying curl!
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
metalink support is in mainline curl!curl 7.26 was just released, so the next release should have it & be out in two months!1) first get libmetalinkhttps://launchpad.net/libmetalinkyou can get the latest withbzr branch lp:libmetalink2) get curl withgit clone git://github.com/bagder/curl.git
then
./buildconf./configure --with-libmetalinkmake
Date: Fri, 27 Jul 2012 23:23:51 +0200 (CEST)
From: Daniel Stenberg <dan...@haxx.se>
To: Curl Announce -- curl users <curl-...@cool.haxx.se>,
curl-a...@cool.haxx.se, libcurl hacking
<curl-l...@cool.haxx.se>
Subject: ANNOUNCE: curl and libcurl 7.27.0
Message-ID: <alpine.DEB.2.00.1207270058470.22192@tvnag.unkk.fr>
Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"
Friends!
Hurry on over to http://curl.haxx.se/download.html and download the fresh
release! This time with new features and two new SSL libraries supported.
Curl and libcurl 7.27.0