cURL / Mailing Lists / curl-library / Single Mail


Download problem.

From: Yanick Pelletier <>
Date: Mon, 5 Nov 2001 15:27:48 -0500

First of all i use libcurl v7.9.1 on win 2k.
I try to download the page at
I have the following problem:
    - I set the option CURLOPT_NOBODY to 1 so i only retrieve the document
    - I call curl_easy_perform()
    - I'm doing some validation with the content-type redirected page,
    - I set the option CURLOPT_NOBODY to 0 to download the document data.
    - i'm trying to download the document data with a custom functions by
calling curl_easy_perform().
Here the bug happen.
The curl_easy_perform call transfer(). Normally the transfert recieve the
header for the send request, followed by the document data. In my case the
transfer() function doesn't recieve the header, it recieve an empty line
(like the last line recieve in the header), so it switch of mode (he don't
wait anymore the the header) but the header follow just after. In this case
the transfer() method loop until it timeout (i have set a time out value of
60 secs).
If i remove the line 548 in "transfert.c" to force the function to wait for
the header before going into body retrieving mode every thing work well.
What do you think about this modification?
line 547 else {
line 548 header = FALSE;
line 549 break;
Received on 2001-11-05