cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: --enable-threaded-resolver "breaks" qemu's curl driver

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Sat, 08 Jun 2013 09:03:11 +0200

On Friday, June 07, 2013 22:48:57 Richard W.M. Jones wrote:
> On Fri, Jun 07, 2013 at 11:29:31PM +0200, Daniel Stenberg wrote:
> > What exactly is that command line doing HTTP-wise? Is it "just"
> > asking for the first 512 bytes from that URL?
>
> In answer to this: yes it should fetch the first 512 bytes
> using some sort of HTTP byte-range request.

From the code you referenced here, you can see it is not that easy. First
it calls curl_easy_perform() with CURLOPT_NOBODY = 1 to get file size from
the HTTP header. Then it creates a separate HTTP connection via the multi
interface for transferring the body.

Note that some parts of the code look rather suspicious, e.g. the line setting
CURLOPT_NOBODY = 0 preceded by setting CURLOPT_WRITEFUNCTION on an easy handle
that is not going to be used any more anyway.

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-06-08