Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Set-Cookie with discard in a perl CGI?

Reply
Thread Tools

Set-Cookie with discard in a perl CGI?

 
 
Norman Ackroyd
Guest
Posts: n/a
 
      09-10-2004
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
 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      09-10-2004
Norman Ackroyd wrote:
> 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.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
 
Gregory Toomey
Guest
Posts: n/a
 
      09-10-2004
Gunnar Hjalmarsson wrote:

>> Besides building my response from scratch and a Socket connect,

>
> ?


Indeed. You dont need to open a socket to print to stdout!

gtoomey
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does StringIO discard its initial value? Leif K-Brooks Python 5 04-15-2005 03:53 PM
Test message, please discard Liangg.4124@schwarzschild.mcgill.ca Microsoft Certification 0 10-26-2004 04:38 AM
Starting up some profiles give a pop-up for working online or offline.How to discard that? Dirk BERTH Firefox 1 08-26-2004 06:49 AM
How can I silently discard packets ? phil~~ Cisco 6 11-13-2003 01:02 PM
Keeping old versions of data for audit trails and save/discard feature David Smith Java 2 07-24-2003 04:03 PM



Advertisments