Hi,

I am baking three cookies, then attempting to see them using the
err_headers_out method.  The problem is that when baked, the key
for each cookie is the same:  'Set-Cookie'.  The Apache::Table
object is ok with this, but when it is tied to the perl hash
the duplicate keys seem to trip things up.  I cannot see the
individual values.  Is there any way to retrieve the values?

Thanks,
Ted


my $cookie1 = Apache::Cookie->new($r, -name => 'oranges', -value => 1, -path => "/", ); $cookie1->bake();

my $cookie2 = Apache::Cookie->new($r,
                  -name => 'apples',
                  -value => 1,
                  -path => "/", );
$cookie2->bake();

my $cookie3 = Apache::Cookie->new($r,
                  -name => 'lemons',
                  -value => 1,
                  -path => "/", );
$cookie3->bake();

my $h = $r->err_headers_out();
warn "1st while ...\n";
while (my($k, $v) = each %$h) { warn "k = $k    v = $v\n"; }

my %h = $r->err_headers_out();
warn "2nd while ...\n";
while (my($k, $v) = each %h) { warn "k = $k    v = $v\n"; }

-------------------------------
Output:

1st while ...
k = Set-Cookie    v = oranges=1; path=/
k = Set-Cookie    v = oranges=1; path=/
k = Set-Cookie    v = oranges=1; path=/
2nd while ...
k = Set-Cookie    v = lemons=1; path=/



Reply via email to