cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURL_DISABLE_COOKIES and CURLOPT_VERBOSE

From: Tom Bishop, Wenlin Institute <tangmu_at_wenlin.com>
Date: Tue, 19 Jun 2012 08:35:21 -0700

As a relatively new user of libcurl, I made the silly mistake of trying to use cookies when CURL_DISABLE_COOKIES was defined. It took me a while to figure out what the problem was. To help others avoid the same mistake, maybe the following could be added in getinfo.c:

+#include "sendf.h" /* Curl_infof() */

...

   case CURLINFO_COOKIELIST:
+ #if defined(CURL_DISABLE_COOKIES) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
+ if(data->set.verbose)
+ Curl_infof(data, "Warning: CURLINFO_COOKIELIST used with CURL_DISABLE_COOKIES!\n");
+ #endif
     *param_slistp = Curl_cookie_list(data);

Best wishes,

Tom

文林 Wenlin Institute, Inc. Software for Learning Chinese
E-mail: wenlin@wenlin.com Web: http://www.wenlin.com
Telephone: 1-877-4-WENLIN (1-877-493-6546)

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