Jim Doyle <[EMAIL PROTECTED]> wrote:

>     I set a cookie as follows:        
>     $Response->Cookies->SetProperty( 'Item', 'Master', 'mind' ) ;
>     $Response->Cookies( 'Master' )->{Expires} = "December 29, 2018" ;
> 
>     How do I retrieve the value of the expiration date?
> 
>     Is Expires a property of the request object's cookie collection?

The request has a "Cookie:" header that contains only names
and values, no date or path or domain.  The expiration time 
appears only in the response header "Set-Cookie:" that set the 
cookie, so if you want to know the expiration time you should 
save it somewhere when you set the cookie in the first place 
(or store it in a cookie value).

That would be a strange thing to do, though.  Normally there's
no reason to want the expiration time.  All you care about is
whether it's expired, and if it's expired the browser won't
send the cookie.  If you're afraid that the cookie is about to
expire, then just reset it and provide a new expiration time.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to