cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Metalink support patch for curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 19 Jun 2012 22:23:15 +0200 (CEST)

On Mon, 18 Jun 2012, Tatsuhiro Tsujikawa wrote:

>> $ 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?

Yes. I think default should be to just get the data, just like it would
without metalink support.

> If the answer is yes, we perhaps make --metalink take no argument and make
> it a switch to toggle further metalink parsing. So the last example command
> line will become:
>
> $ curl --metalink -O http://.../file.metalink
>
> The --metalink is also used to toggle upcoming metalink/http feature.

Yes, I think that would make perfect sense.

> For reading local metalink file, new option --metalink-file will be added.

Hm, do you really need a separate option for that? Won't it just be a file://
URL instead pretty much?

-- 
  / 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
Received on 2012-06-19