ben syverson wrote:

I'm new to the list, although I've read so many of its messages I feel like I subscribed weeks ago. :) I'm having some problems getting libapreq2's Apache::Cookie to send out more than one cookie. The same basic code worked fine in mp1, which makes me think I'm doing something improperly. The code in question is contained within a subroutine in a module that gets called from a registry script.

Here's the code:
$r = shift;
my $cookie = Apache::Cookie->new($r,
-name => 'id', -value => $id,
);
my $cookie2 = Apache::Cookie->new($r,
-name => 'chocolate_chip', -value => $chip,
);
$cookie->bake;
$cookie2->bake;
$r->content_type('text/html');
$r->print("just the chip comes through");

I'm using Apache 2.0.52, mod_perl-2.0.0-RC4, and libapreq2-2.04_03-dev. Apache is configured down to only what is needed to run mod_perl and libapreq2.

Should I cave and use CGI::Cookie to send these measly two cookies?

I'm using Apache 2.0.52, mp-1.99_17, and libapreq2-2.04_03.

Have you checked the expiration of your cookies? With libapreq2, not specifying an expiration date has the expiration set to "now". With libapreq1, not specifying an expiration date made it a session cookie. So, with libapreq2-2.04_03, you need to specifically set the expires to undef to make it a session cookie, e.g. "-expires=>undef".

Could that be your problem?

Take care,

Kurt

Reply via email to