Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Don't ask to ask, just ask
 
PerlMonks  

Re: Cookies write to screen, not to cookie file

by tadamec (Beadle)
on Jul 01, 2004 at 16:13 UTC ( [id://371229]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Cookies write to screen, not to cookie file

As others have said, CGI and CGI::Cookie are perfect for this.

It sounds suspiciously like a buffered-output problem, where one module is buffering the output to be sent to STDOUT on completion of the script, and you're subverting the purity of the HTTP headers by issuing a print statement before it's time.

It also could be, as others have said, that you're not placing the "\r\n" after the cookie header.

Unless you're writing your own one-off modules to learn more about the CGI interface, in general, please, please, please use the various CGI modules; they're well tested and make writing secure CGI scripts if not simple, then at least attainable for a novice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://371229]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.