🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.pascal.delphi.misc
1 messages
1 total messages Started by JoeAley2003 Mon, 15 Mar 2004 20:29
AResponseInfo.AddCookie and IdCookiemanager BUG!!!
#185
Author: JoeAley2003
Date: Mon, 15 Mar 2004 20:29
37 lines
2290 bytes
Hi all...

I'm trying to do an anonymizer proxy with indy.

I Use a TIdHTTPServer and for each request in the OnCommandGet Event,
i make a new instance of a TIdHTTP (client) (with a TIdCookieManager
instance assigned) then i do the good request and get the response
normally. it works, but the cookies must be written to my client too. 

So, i wrote on OnCommandGetEvent of TidHTTPSERVER

       IdHTTP.Get(MyGetStr,GetStream);

       i := 0;
       while(i < IdHTTP.CookieManager.CookieCollection.Count) do
         begin         
AResponseInfo.Cookies.AddCookie(IdHTTP.CookieManager.CookieCollection.Items[i]);
           Inc(i);
         end;

       //Here we can check that the count number of cookies in
ResponseInfo type was not incresed, it is still zero!!!

       if(AResponseInfo.Cookies.Count = 0) then
         begin
           Form1.Memo.Lines.Add('NO, THE COOKIE IS NOT WORKING!!!');
//Always
         end;

Since the types are the same and i can watch the cookies in
IdHTTP.CookieManager.CookieCollection.Items[i], the AddCookie function
is not working!!!

By the way, how could i write these cookies to my clients? Should i
write it in ContentText?

Thank you all!
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads