curl-users
Re: Metalink support patch for curl
Date: Sun, 17 Jun 2012 19:10:45 +0900
On Sun, Jun 17, 2012 at 5:49 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 15 Jun 2012, Anthony Bryan wrote:
>
>> Daniel,
>>
>> do you want Metalink/HTTP support off by default, even though it will not
>> have other dependencies (like libmetalink for XML), just the usual crypto
>> libs for hash verification used by other features if available?
>
>
> I want metalink to be noticed and included in the build if configure detects
> things by itself. I don't want curl to automatically ask for and do metalink
> downloads unless --metalink is used since I think that is in line with how
> curl generally work with features and things.
>
> And it works like this already!
>
I want to clarify the current behavior of curl with libmetalink enabled.
--metalink option takes *local* file and parses it as Metalink and
downloads URIs described there:
$ curl --metalink /path/to/metalink.xml
--metalink option does not take http URI or so. It produces error.
On the other hand, if HTTP URI to metalink file is given to curl
*without* --metalink option:
$ curl 'http://curl.haxx.se/metalink.cgi?curl=tar.gz'
This downloads Metalink XML and prints it in stdout and nothing more.
If we instruct curl to save it in the disk, e.g., -O option, it parses
downloaded file as Metalink (if the Content-Type indicates Metalink)
and downloads URIs described there. So the following command line:
$ curl -O 'http://curl.haxx.se/metalink.cgi?curl=tar.gz'
will actually download Metalink file and the URI described there.
Does we need --metalink like switch in this case too?
Best regards,
Tatsuhiro Tsujikawa
>
>> thinking about it, do we want a --metalinkoff or equivalent so you could
>> download a metalink file but not process it or turn off Metalink/HTTP?
>
>
> As it isn't enabled by default in requests even when enabled in the build,
> it will by default only download the actual metalink resource.
>
>
>> also, let me sum up where we are now. things left undone:
>>
>> 1) Metalink/XML support triggered by metalink4 Content-Type
>> 2) Metalink/XML support triggered by HTTP Link header field (as
>> mentioned in RFC 6249)
>> 3) Metalink/HTTP (RFC 6249)
>> 4) NSS for hash verification. could someone help with this?
>> 5) parallel downloads (as mentioned on your blog). could be nice.
>> 6) use of partial file hashes from Metalink/XML to re-download a part
>> of the file if it contains errors (I don't think the current patches
>> support this).
>> 7) I also need to update some of the documentation
>
>
> Thanks for this list. I'm sure Tatsuhiro will agree with me when I say that
> we will appreciate all the help we can get in working on these issues.
>
> Issue number (5) from the list ("parallel downloads") is somewhat largish
> and has been discussed for general curl downloads in the past and would
> benefit all kinds of downloads - in addition to the metalink ones.
>
> --
>
> / daniel.haxx.se
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-17