Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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?

Comment on Determining if a cookie was 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2015-11-25 09:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (672 votes), past polls