cURL / Mailing Lists / curl-library / Single Mail

curl-library

Réf. : Re: Getting a cookie sent by a server

From: Gilles Talbot <gilles.talbot_at_creditlyonnais.fr>
Date: Tue, 9 Oct 2001 16:42:07 +0200

Daniel Stenberg <daniel_at_haxx.se> le 09/10/2001 13:48:54

Pour : Gilles Talbot/DED/DSTI/CLY_at_CLY
cc : libcurl Mailing list <Curl-library_at_lists.sourceforge.net>

Objet : Re: Getting a cookie sent by a server

On Tue, 9 Oct 2001, Gilles Talbot wrote:

i've upgraded to 7.9
i tried to specifya file path with CURLOPT_COOKIEJAR.
but when i send the request, i receive the answer, but i don't have no file
with the cookies, and i know the server i sending a cookie

-----------------------------------------------------------------------------------------
> how do i get a cookie sent by a server, after i have used
> curl_easy_perform ?

Well, it depends on how you want it.

You can set a callback to get all headers. You'll then get called once for
every header and you'll have to figure out yourself when a cookie is
received.

If you only want to re-use any possible cookies in a second request, you
can
store all headers in a file and use CURLOPT_COOKIEFILE in the subsequent
requests.

Starting with libcurl 7.9 CURLOPT_COOKIEJAR can be used to store all known
cookies in a netscape formatted cookie file.

There is unfortunately no special cookie-callback or something like that to
get to know only about (particular) cookies. It is a listed TODO item.

> I'm using curl 7.8

You should consider upgrading to 7.9.

--
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/

Ce message contient des informations confidentielles ou appartenant au
Crédit Lyonnais et est établi à l'intention exclusive de ses
destinataires. Toute divulgation, utilisation, diffusion ou reproduction
(totale ou partielle) de ce message, ou des informations qu'il contient,
doit être préalablement autorisée. Tout message électronique est
susceptible d'altération et son intégrité ne peut être assurée.
Le Crédit Lyonnais décline toute responsabilité au titre de ce
message s'il a été modifié ou falsifié. Si vous n'êtes pas
destinataire de ce message, merci de le détruire immédiatement et
d'avertir l'expéditeur de l'erreur de distribution et de la destruction
du message.

This e-mail contains confidential information or information belonging
to Crédit Lyonnais and is intended solely for the addressees.
The unauthorised disclosure, use, dissemination or copying (either whole
or partial) of this e-mail, or any information it contains, is prohibited.
E-mails are susceptible to alteration and their integrity cannot be guaranteed.
Crédit Lyonnais shall not be liable for this e-mail if modified or falsified.
If you are not the intended recipient of this e-mail, please delete it
immediately from your system and notify the sender of the wrong delivery
and the mail deletion.
Received on 2001-10-09