cURL / Mailing Lists / curl-users / Single Mail

curl-users

Metalink support patch for curl

From: Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com>
Date: Sat, 28 Apr 2012 01:04:50 +0900

Hi,

I finally updated my 3year-old Metalink support patch to the curl
master branch. The patch is attached.

The Metalink support is enabled when configure option
--with-libmetalink is used. It defaults to be disabled.
This adds --metalink option to curl.
You can give Metalink file to curl like this:
   $ curl -O --metalink foo.metalink

The functionality is very limited. It only tries next resource if the
download is not
successful (e.g., 404 Not found). No size or hash information in
Metalink file are used.

I admit that the patch is in very early stage. There are many duplicated code.
The Metalink related code resides in tool_metalink.c.
Mostly I copied code from tool_operate.c to tool_metalink.c.
Maybe it would be better to integrate Metalink function to operate()
in tool_operate.c but there is the difference in control flow (for
example, in Metalink, we don't use URI globbing. Instead we need
another loop through all resources in Metalink file) so we will need
many if-else cause.

Still rough edges, but this is the first step.

Best regards,

Tatsuhiro Tsujikawa

-------------------------------------------------------------------
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-04-27