Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Determining if a cookie was accepted

by nop (Hermit)
on Feb 01, 2003 at 02:48 UTC ( #231785=perlquestion: print w/replies, xml ) Need Help??
nop has asked for the wisdom of the Perl Monks concerning the following question:

Hi folks,
If a mod_perl script attempts to set a cookie, how can you determine at that time if the cookie was successfully accepted?

Replies are listed 'Best First'.
Re: Determining if a cookie was accepted
by PodMaster (Abbot) on Feb 01, 2003 at 03:08 UTC
Re: Determining if a cookie was accepted
by dempa (Friar) on Feb 01, 2003 at 03:06 UTC

    Cookies are sent in the http headers and if I'm not mistaken there's no way to determine if the client accepted or rejected them. The only thing I can think of is to check for the cookie next time the user requests a page (but that's probably not what you want since you write "at that time").


Re: Determining if a cookie was accepted
by glwtta (Hermit) on Feb 01, 2003 at 03:38 UTC
    hm, I suppose after sending the header you could print a small javascript function that would send another request (lots of options there) to a script which, after checking what cookies it gets, would set a flag (with your favourite shared memory / IPC mechanism) for which your first script would have to wait.

    Though that doesn't sound like that good a solution to me... in fact, I don't even know if that would work, Monks?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://231785]
Approved by Courage
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2018-04-25 01:42 GMT
Find Nodes?
    Voting Booth?