[please cc the modperl@perl.apache.org list on all list response threads]

Hi [EMAIL PROTECTED],

> Hi Fred!
> I'm wondering if there is a correct way to set a cookie in a
> PerlAccessHandler.
>
> I've tried something like:
>  $r->headers_out->add('Set-Cookie' => $cookie);
> and even:
>   $r->err_headers_out->add('Set-Cookie' => $cooki
>
> whithout success.
>
> I need to add the cookie if doesn't exists and leave in the request  if it
> exists.

There's a few recipes here:
http://perl.apache.org/docs/2.0/user/coding/cooking.html#Sending_Cookies_Using_libapreq2

How are you generating $cookie?  You'll likely want to add the cookie in
any case, to update certain values or timestamps, I can't think of a case
where I haven't done so.  You may want to look at Apache2::AuthCookie
which is a fully functional module to do exactly this.

>
> Any idea?
> Younes
>
> ----Message d'origine----
>>Date: Thu, 09 Mar 2006 01:45:40 -0800
>>De: Fred Moyer <[EMAIL PROTECTED]>
>>A: [EMAIL PROTECTED]
>>Copie à: modperl@perl.apache.org
>>Sujet: Re: Modperl2 question
>>
>>[EMAIL PROTECTED] wrote:
>>> Hi All!
>>>
>>> I'm planing to port a web application for mod_perl1 ro mod_perl2.
>>>
>>> I've carefully read to porting pages related to that
>>> (http://perl.apache.org/docs/2.0/user/porting/), but unfortunatelly, I
>>> haven't
>>> found solutions to my simple problems.
>>>
>>> 1. How can I read a cookie from a PerlResponseHandler ?
[...]

Reply via email to