cURL / Mailing Lists / curl-library / Single Mail

curl-library

putting your hands in the cookie jar (was Re: PHP curl wrapper)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 13 Aug 2002 08:50:28 +0200 (MET DST)

On Tue, 13 Aug 2002, Wez Furlong wrote:

> In PHP, we have lived without writeable http for a long time now, so this
> was not actually something I was worried about :-)

Ah, ok! ;-)

> However, I think that you can "leverage" (that's the corporate word for
> "borrow from" ;-) PHP and Apache to help with the chunked transfer (and
> also zlib/deflate handling).

There are several sources to get inspiration from and to see how those kinds
of things should be dealt with, yes. That should not really be a problem for
anyone who would like to implement this for libcurl.

One day I'll get some time over to get this implemented, but as it feels
right now, it'll take a while until I get there. The area is wide open for
anyone who feels like taking a swing at libcurl core hacking! :-)

> I've got some thoughts on cookies and "sessions" and how they can be tied
> into the framework that I've developed for PHP that might benefit other
> applications adopting libcurl in a similar way: PHP will have a "stream
> context", functionally somewhat similar to an "internet session" in the
> Windows Inet API.

I'm sorry, but I have absolutely no idea how that works or what it is!

> The plan is to have common settings, cookies and other session related
> information stored in this context parameter.

Ok, sounds fair enough.

> From what I've read so far from the various docs in the curl CVS, although
> curl can do this stuff, it's not 100% application friendly. For instance,
> with the cookie jar functionality, I'd like to be able to specify callbacks
> for reading individual cookies from the jar and writing them to the jar.
> Then we can implement the jar using a PHP hash table, which means that
> scripts can directly manipulate it (which = very nice indeed).

The very first line in the docs/TODO file says something about this:

 * Consider an interface to libcurl that allows applications to easier get to
   know what cookies that are sent back in the response headers.

... as you already have noticed, libcurl keep pretty good track of these
things so all we would need to do is to add a suitable API for getting access
to this information and we're set!

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists please
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
Received on 2002-08-13