Peter Haworth wrote:
> On Sat, 05 Jan 2008 00:56:49 -0500, Colin Wetherbee wrote:
>>> On Jan 4, 2008 9:47 PM, Colin Wetherbee
>>> wrote:
>>>> From the Apache2::Cookie documentation, bake() "adds a Set-
>>>> Cookie header to the outgoing headers table." Is there a way to
>>>> undo this without manually editing the headers, preferably with
>>>> Apache2::Cookie methods?

>> I'm trying to work out a way to not have to rely on undoing cookies,
>> but I haven't had any luck so far. It's for a complicated
>> authentication system.

>
> Then don't bake them until you're ready to send them. I have a similar
> situation in which my session information might change during the
> course of the request, but each step wants to make sure that if it's
> the last one, those changes get into the cookie. Instead of baking
> when setting the cookie value, I just stuff it into a hash based on
> the cookie name (which lets me handle multiple cookies this way should
> the need arise). My application has a method which calls Apache's
> send_http_header() method, amongst other things, so I just bake all
> the saved cookies in this method before calling send_http_header().


I've used your suggestion, along with Hash::Merge, to solve my problem.
Thanks!

Colin