[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] How do I delete a session in C::A::P::Session?


Thank you Dan.

I did all this and it worked, but it seems like it should all happen with
one method instead of 3. Having

   $self->session->delete();

really work would be nice, and make the most semantic sense.

Brad





> I vaguely I had a similar problem a while back. This is what I got to work,
> although I don't know if it's the way I should be doing it, since I'm
> calling CGI::Session's delete directly, and I don't call the plugin's delete
> at all:
> 
>     $self->session->delete();
>     $self->session_cookie(-expires => 'now');
> 
> Also make sure you call
> 
>     $self->session->flush;
> 
> In your teardown method
> 
> Dan 
> 
>> -----Original Message-----
>> From: Brad Cathey [mailto:suppressed
>> Sent: Wednesday, 24 January 2007 5:34 a.m.
>> To: suppressed
>> Subject: [cgiapp] How do I delete a session in C::A::P::Session?
>> 
>> I've heard rumors for a while that this doesn't work for
>> deleting session
>> cookies:
>> 
>>      $self->session_delete();
>> 
>> ...and indeed that is true. I've also tried:
>> 
>>     $self->session_cookie(-expires => '+0s');
>> 
>> ...which does work!
>> 
>> Am I missing anything?
>> 
>> I am setting up the session like this:
>> 
>>     $self->session_config( DEFAULT_EXPIRY => '+8h');
>> 
>> ...and I do need to delete the cookie and session (this is an
>> e-com site).
>> 
>> Brad
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> Web Archive:  http://www.mail-archive.com/suppressed/
>>               http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
>> To unsubscribe, e-mail: suppressed
>> For additional commands, e-mail: suppressed
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> Web Archive:  http://www.mail-archive.com/suppressed/
>               http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail: suppressed
> For additional commands, e-mail: suppressed
> 
> 



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.