cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Implementing a HTTP cookie callback

From: Drew Richardson <drewrichardson_at_gmail.com>
Date: Sun, 8 Nov 2009 07:51:08 -0700

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

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET