Board index » delphi » indy cookieManager - copying cookies

indy cookieManager - copying cookies

2005-10-27 11:33:12 PM
hi everybody,
im using indy 9.018 and im trying to copy the contents of
a CookieManager to another cookie Manager ( in a different thread ).
Ive tried just about everything but somehow the server im "GET'ing"
from..seems to know that im not using the original cookies.
what i want to do is basically....this.
{ main code }
IdHTTP1.CookieManager := Main_cookieManager;
IdHTTP1.Post(some_url, postData, resp);
// now i have the cookies in my MAIN cookie manager
now either from this main thread....or in the seprate thread... i want
to COPY those cookies....into the cookiemanager thats inside the
sperate thread.
something like..
{ psuedo-code }
Copy_cookies( IdHTTP1.CookieManager , MY_thread.cookiemanager );
so that in that seperate thread...i can do a..
html := thread_IdHTTP1.GET(a_url);
// and this GET will be using the same cookies as in the MAIN cookie
so far I have tried,
thread_cookiemanager.cookiecollection.assign(IdHTTP1.CookieManager );
for i:= 0 to IdHTTP1.CookieManager.cookiecollection.count-1 do
i have also tried setting the threads cookieText directly....still
doesnt work....
anybody have any ideas, please?
any help ill be grateful for.
thanks, Dave

Re:indy cookieManager - copying cookies

Just found out....that i had set the Http.Request.AcceptEncoding :=
'gzip, deflate';
and it was bringing back garbage.
Everything ok now ( except that i feel like a right lemon ! )

Re:indy cookieManager - copying cookies

Next time you post, you should post directly to the Borland news server to
make everybody see it.
Take a look here:
which links to