perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond Wan <>
Subject Re: Cookie questions
Date Tue, 25 Dec 2007 06:45:01 GMT

Hi John,

John ORourke wrote:
> Cookie names are unique to a given domain (the domain which can 
> optionally be explicitly set using $cookie->domain ) - if you write 
> another cookie with the same name and domain and path it'll overwrite 
> the previous one.

Ah, thanks for this!  I guess I had a bug somewhere and I was setting 
the cookie from two different files and the default path in both cases 
were different because I didn't explicitly state it.  I've done that 
now, and as you said, only one appears in the browser.  Thanks!

>> $r->err_headers_out->add ("Set-Cookie" => $cookie->as_string);
> Fine, that's basically what the bake() method does.  I made a subclass 
> of APR::Request::Cookie which included some hacks - try these:

I see.  Thanks for the suggestion!  I thought one was better than the 
other, but whatever gets the job done?

Since duplicates aren't allowed, I guess I don't have to get the cookie, 
change the date, and send it.  I can just send a new one with a negative 
or 0 date.  Whether or not the cookie was there in the first place, the 
result is that there won't be one.  Thanks!


View raw message