Ok, so continuing down the path of a single sign-on system, I've completed a
rough framework, and it works fine.  However, I thought it might be nice to
segregate the various bits of information into different cookies.
Unfortunately, setting multiple cookies doesn't seem to be working.  Here
are the outbound headers obtained via $r->as_string:

Set-Cookie: ACS_UID=miller; path=/
Set-Cookie: ACS_Test=blah; path=/
Set-Cookie: ACS_Ticket=stuff; path=/

on the next request, here's the Cookie header:

Cookie: ACS_Ticket=stuff; RC_Creds=miller%2C

The RC_Creds cookie is set in a callback handler.  So, where are the other
two cookies?

I've tried the following incantations:

foreach( [ $cookie_a, $cookie_b, ... ] ) {
    $r->err_headers_out->add( 'Set-Cookie', $_ );
}

    or

$r->err_header_out( 'Set-Cookie' => $cookie_a );
$r->err_headers_out->add( 'Set-Cookie' => $cookie_b );

    or

$r->err_headers_out->add( 'Set-Cookie' => [ $cookie_a, $cookie_b ] );

The outbound headers all look the same, but in each case, only the last
cookie is set.  This happens with both Netscape and IE.

The really annoying thing is that this was working at one point: I would set
multiple cookies in one go, and all the cookies would be sent back to the
server on the next invocation.

I've searched the Guide and online, but I've not found any clues as to why
the multiple cookies are NOT being set.

Brain cramp, or something more serious?

    -klm.



Reply via email to