Re: Add cookies to shared list

Giganews Newsgroups
Subject: Re: Add cookies to shared list
Posted by:  Remy Lebeau \(TeamB\) (
Date: Mon, 20 Oct 2008

"dk_sz" <dk_…> wrote in message

> Then in OnNewCookie they merge the new cookie into
> shared cookiemanager *FOptions.AllowCookieManager*:

Indy is not designed to work that way.  What you are asking for is currently
not supported.

> ACookieManagerUpdate.CookieCollection.Assign(FOptions.AllowCookieManager.CookieCollection);

TIdCookies does not override the Assign() method, so the internal list of
domains that TIdCookies manages would not be copied by the default
implementation of Assign() inside of TCollection.

> This however causes access violations.

Not surprising.

> How is cookies supposed to work in Indy?

TIdCookieManager is not designed to share cookies with other instances.  I
don't recommend you try.  It would be easier to just store your own cookie
lists instead, such as by using TIdThreadSafeStringList or TIdThreadList.

Remy Lebeau (TeamB)


In response to

Add cookies to shared list posted by dk_sz on Thu, 16 Oct 2008