cURL / Mailing Lists / curl-library / Single Mail

curl-library

Download problem.

From: Yanick Pelletier <ypelletier_at_copernic.com>
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 http://www.lacapitale.com
<http://www.lacapitale.com>
 
I have the following problem:
    - I set the option CURLOPT_NOBODY to 1 so i only retrieve the document
header.
    - I call curl_easy_perform()
    - I'm doing some validation with the content-type redirected page,
etc...
    - 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;
 
Thanks!
 
Yanick
Received on 2001-11-05