Set-Cookie with discard in a perl CGI?

N

Norman Ackroyd

I've got a CGI script that is going to set a cookie and I would like
to be able to use some of the attributes specified in RFC2965
(ftp://ftp.isi.edu/in-notes/rfc2965.txt) such as "discard" . CGI.pm
appears to only support cookie attributes specified in the original
"HTTP State Management Mechanism" - RFC2109 document. Besides building
my response from scratch and a Socket connect, are there any cgi
modules out there that will do this?

Thanks,
Norm Ackroyd
 
G

Gunnar Hjalmarsson

Norman said:
I've got a CGI script that is going to set a cookie and I would
like to be able to use some of the attributes specified in RFC2965
(ftp://ftp.isi.edu/in-notes/rfc2965.txt) such as "discard" . CGI.pm
appears to only support cookie attributes specified in the
original "HTTP State Management Mechanism" - RFC2109 document.

If that's the case, it's not very difficult to print the cookie
'manually':

print "Set-cookie: name=value; path=/; otherattr\n";

Then you can include whichever attributes you believe the browsers
will understand. :)

Of course, depending on what the cookie may contain, you may need to
URI escape it.
Besides building my response from scratch and a Socket connect,
?

are there any cgi modules out there that will do this?

A search at CPAN should give you the answer to that question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top