cURL / Mailing Lists / curl-library / Single Mail

curl-library

[ curl-Bugs-1020281 ] setting the CURLOPT_NOBODY to 0 does not have any effect

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 01 Sep 2004 02:18:52 -0700

Bugs item #1020281, was opened at 2004-09-01 12:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1020281&group_id=976

Category: http
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Eugeny N Dzhurinsky (jdevelop)
Assigned to: Daniel Stenberg (bagder)
Summary: setting the CURLOPT_NOBODY to 0 does not have any effect

Initial Comment:
Here is the code

    printf( "Loading the image (%s)\n", URL );
    curl_easy_setopt( hnd, CURLOPT_URL, URL );
    curl_easy_setopt( hnd, CURLOPT_NOBODY, 1 );
    curl_easy_perform( hnd );
    double length;
    curl_easy_getinfo( hnd,
CURLINFO_CONTENT_LENGTH_DOWNLOAD, &length );
    count = ( unsigned long ) length;
    data = new unsigned char[ count ];
    ptr = data;
    save = true;
    curl_easy_setopt( hnd, CURLOPT_URL, URL );
    curl_easy_setopt( hnd, CURLOPT_NOBODY, 0 );
    curl_easy_perform( hnd );
    ptr = data;
    save = false;
    printf("Image size is %ld\n", count);
    printf( "Loaded\n" );
    return new PNGImage( data );

I set the CURLOPT_VERBOSE to 1 and found the call to
curl_easy_perform second time still sends the HEAD
request instead of GET request.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1020281&group_id=976
Received on 2004-09-01