cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Metalink support patch for curl

From: Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com>
Date: Fri, 22 Jun 2012 23:26:17 +0900

On Fri, Jun 22, 2012 at 2:03 AM, Yang Tse <yangsita_at_gmail.com> wrote:
> Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com> wrote:
>
>> I ran tests several times, but I didn't see much difference between
>> patched and unpatched sources. Both completed tests around 6 minutes.
>
> In my case a full run of the test suite, not counting compilation
> time, takes nearly 45 minutes. Yes I know, I need more processing
> power ;-) So execution time is something I usually notice. I will do
> some investigation into this next week when time permits, to verify if
> there's actually a time increase or not.
>

Thanks.

>>> For the benefit of scripts parsing curl's stderr It would be
>>> interesting if all metalink related messages sent to stderr started
>>> with a common literal such as 'Metalink:'.
>>>
>>
>> Agreed. Patch attached.
>
> And pushed a couple of minutes ago.
>

Great! Thanks!

> I've added six more Metalink tests with 'funny' command line options.
> And these reveal the following:
>
> Test case 2010 pushed disabled given that it seems to trigger
> unexpected behavior. Option '--include' (-i) used along with
> --metalink should most probably not include the HTTP headers in the
> downloaded file.
>

The attached patch 0001 ignores --include option if --metalink is used together.
I agree that including headers in response is pointless if --metalink
is used, because it confuses XML parser (if metalink file is
downloaded from http server) and/or hash check will fail as test2010
revealed.

The patch 0002 enables test2010 as it is working now.
I fixed hash value because it seemed wrong.

(Patched your sentences as your last e-mail)
> And there's something else to ponder. Should option '--dump-header'
> (-D) work as it is doing right now along with '--metalink' option, or
> should we make sure that no HTTP headers are dumped nor
> dump-header file is created when both options are used?
>
> If --metalink along with --dump-header is 'fixed', metalink test case
> definitions will also need fixing.

I feel current behavior is probably OK because it does not break Metalink
processing and dumping header of downloading remote file is make sense
to me even in metalink file.

Best regards,

Tatsuhiro Tsujikawa

>
> --
> -=[Yang]=-
> -------------------------------------------------------------------
> 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-22