After doing some googling it seem that libcurl does not provide
callbacks to give cookies for a HTTP GET/POST or a callback with the
returned cookies on the response. Yes, I know I could manually add
the cookies myself, then manually parse the return, but libcurl
already knows how to do this kind of stuff, why reimplement it?
Another possibility is to use the cookie file, but that is only
written to disk when cleanup is called. I'd like something more
immediate. Googling also turned up http://curl.haxx.se/dev/COOKIES
from 2003, and the RECVFUNC/SENDFUNC described there seem to be
exactly what I'm interested in, but this was never implemented, and
other features described there were implemented in different ways.
So I'm willing to implement this functionality. Perhaps using the
same callback functions as RECVFUNC/SENDFUNC from the link above, then
pass them to curl_easy_setopt similar to CURLOPT_WRITEFUNCTION? I'd
like some guidance before I start coding so that it's more likely to
be accepted when I submit the patch.
Drew
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-08