cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Metalink support patch for curl

From: Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com>
Date: Mon, 7 May 2012 00:47:21 +0900

On Sat, May 5, 2012 at 6:17 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 4 May 2012, Tatsuhiro Tsujikawa wrote:
>
> First out, I've tried your updated patch series and it is really a major
> step fotward and I would say that it is now almost ready for merge. A really
> good job! I would say the only little drawback I found now is that there's a
> bunch of #ifdefs for HAVE_LIBMETALINK in the code, but I find that a rather
> cheap price and something we can work on decreasing over time.
>

Great to hear that! Thank you.

> See below for some further feedback.
>
> I would also like to urge other readers of this list to try out Tatsuhiro's
> work and post your opinions here!
>
>
>>> for other documentation, eventually there should also be Metalink info in
>>> 'man curl' and add Metalink info to 'curl --help' add Metalink to "Features"
>>> list in 'curl --version' ? (I'm sure there's other places, but those are a
>>> good start :)
>>
>>
>> Yes, it is needed in the end.
>
>
> Yes, the man page and --help additions will be needed, and adding it to the
> --version outout will be helpful to users to figure out if their version
> supports metalink.
>
>
>> Not yet. Since checking checksum needs hash calculations and we depend on
>> the library for them, I first check the current curl code where hash
>> calculation is implemented.
>
>
> The existing hash code is not exposed to the client code but is only libcurl
> internal so far. We do have some code that we still re-use in curl from
> libcurl under the hood that isn't using the API - just in the name of
> avoiding code duplication - and there might be reasons to do this for some
> hash functions as well. Although I'm not sure they are that easily shared
> like this. It needs to be investigated closer.
>

It seems that this effort takes some time, so is it possible to merge
the current status of patch set of metalink? (of course, after code
freeze is end). After merge, we can improve and add hash
functions.

>
>> I think the behavior of checking hash and deciding re-download is
>> debatable to suite curl project.
>
>
> Hm. What would be the different alternatives here to select between you
> think?
>

The behavior of curl when -O is given is always re-download file.
So user might expect this even in Metalink download.
On the other hand, I think it is the good point of Metalink to check
the file and re-download
it if it failed hash check.
Re-download file using another mirror when hash check *after* the
download is fine for me because there is no such function in curl at
the moment.
I think one possible way to solve this is add the command-line option,
say --hach-check-before, to toggle hash check before download.

Best regards,

Tatsuhiro Tsujikawa

> BTW, as we are in a feature freeze until the next release your work will not
> be merged and pushed to the main repository until after 7.26.0 is out (in a
> few weeks).
>
> --
>
>  / 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-05-06