cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Empty POST requests with libcurl on Tiger PPC

From: Nanbackups <nanbackups_at_gmail.com>
Date: Mon, 22 Feb 2010 14:23:46 -0500

<<Are those the only options your app uses? No auth options for example?

I do not have any authentication options set via CURLOPT_USERPWD or
related options. I do have have proxy authentication, although this
example transfer was without a proxy enabled.
The other options I'm setting are, with some conditionals and other
logic around them removed:

SetPointerOpt(CURLOPT_ERRORBUFFER, error_text)
SetStringOpt(CURLOPT_URL, request.url())
// Verify the peer's certificate.
SetBoolOpt(CURLOPT_SSL_VERIFYPEER, true)
// Verify the name in the peer's certificate
// matches the host name.
 SetInt64Opt(CURLOPT_SSL_VERIFYHOST, 2)

success = success &&
   SetStringOpt(CURLOPT_PROXY, host) &&
   SetInt64Opt(CURLOPT_PROXYPORT, port);
success = success && SetStringOpt(CURLOPT_PROXYUSERPWD, *proxy_user_pass);
success = success && SetStringOpt(CURLOPT_CAINFO, cacerts);

// Callbacks.
SetPointerOpt(CURLOPT_WRITEFUNCTION,
       (const void*)(&ResponseCallback)) &&
SetPointerOpt(CURLOPT_WRITEDATA, response->mutable_response()) &&
SetBoolOpt(CURLOPT_VERBOSE, true) &&
SetPointerOpt(CURLOPT_DEBUGFUNCTION,
       (const void*)(&DebugCallback)) &&
SetPointerOpt(CURLOPT_DEBUGDATA, callback_helper) &&
// Don't follow redirects.
SetBoolOpt(CURLOPT_FOLLOWLOCATION, false) &&
SetPointerOpt(CURLOPT_PROGRESSFUNCTION,
       (const void*)(&ProgressCallback)) &&
SetPointerOpt(CURLOPT_PROGRESSDATA, &aborted_) &&
SetBoolOpt(CURLOPT_NOPROGRESS, false);

// Header.
success = SetPointerOpt(CURLOPT_ENCODING, NULL);
curl_header = curl_slist_append(curl_header,
       "Accept-Encoding: gzip, deflate");
curl_header = curl_slist_append(curl_header, "Content-Encoding: gzip");
success = SetPointerOpt(CURLOPT_HTTPHEADER, curl_header);
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-22