Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIdHTTP, TIdCookieManager, accepting cookies
#2
(04-02-2022, 01:55 AM)Boba TC Wrote: Dear All; when using the TIdHTTP and TIdCookieManager components, how do I accept a cookie?

You don't do that manually, TIdCookieManager handles that for you.

(04-02-2022, 01:55 AM)Boba TC Wrote: Here's what I'm trying to:
...
Looks like Indy components do their job

Sounds like it, yes.

(04-02-2022, 01:55 AM)Boba TC Wrote: but the server response is a 200Kb HTML doc that basically says "your browser blocks cookies...".

I'm going to guess that although TIdCookieManager is accepting the cookies, maybe it is not sending them back to the server, either due to a logic bug that makes it think they don't belong to the URL being requested, or maybe the cookies themselves are malformed in such a way that prevents it from sending them back.

Are you able to provide the actual URL for testing? Or at least a trace of the raw HTTP requests/responses? You can attach an Intercept component, such as one of Indy's TIdLog... components, to the TIdHTTP::Intercept property.

(04-02-2022, 01:55 AM)Boba TC Wrote: I did try to set ACookie argument in the IdCookieManager1->OnNewCookie handler call to true but result is the same.

I assume you meant VAccept, not ACookie, yes?

Reply


Messages In This Thread
RE: TIdHTTP, TIdCookieManager, accepting cookies - by rlebeau - 04-04-2022, 06:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)