Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Determining if a cookie was accepted

by nop (Hermit)
on Feb 01, 2003 at 02:48 UTC ( [id://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?
Thanks
nop

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").

    -- 
    dempa

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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://231785]
Approved by Courage
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found