Share interface force-enable the cookie parser?
Date: Mon, 19 Nov 2007 22:48:13 +0000
I'm having a bit of a trouble when using the share interface. I'm
using it for the purpose of DNS sharing between easy handles in
After I've added an easy handle to the share handle using
curl_easy_setopt, the cookie parser seems to be automatically enabled
for that easy handle. This causes a lot of trouble for my current
project which heavily depends on external data to set headers. The
result is actually libcurl sending MULTIPLE "Cookie"-headers.
I explicitly tell the share interface, before I add any easy handles,
to share only the DNS cache. This I do using:
curl_share_setopt(s, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
And I even tried setting it to the following (in case cookie sharing
was enabled by default):
(CURL_LOCK_DATA_DNS & ~CURL_LOCK_DATA_COOKIE)
I need a way of disabling the cookie parser. For now I think I'll
stick with disabling the share interface.
Note that I add the cookie header using a new slist each time (along
with other headers), instead of through the CURLOPT_COOKIE. I don't
know if this makes any difference, nor am I willing to let my program
compare every single header with "Cookie" to determine whether to send
it through a curl_slist or the CURLOPT_COOKIE option.
I've attached two files. A simple program reproducing the case, and
the libcurl verbose output when running it.
Thanks in advance,
Received on 2007-11-19