Ok, I have to use apr_table_add instead od apr_table_set.
So I should write:

apr_table_add(r->headers_out, "Set-Cookie", co);
apr_table_add(r->headers_out, "Set-Cookie", co1);

If I write:

apr_table_set(r->headers_out, "Set-Cookie", co);
apr_table_merge(r->headers_out, "Set-Cookie", co1);

is it right?

What are the differences between the two approches? browser compatibility?
Best regards

Marco

Sorin Manolache ha scritto:
On Thu, Mar 26, 2009 at 09:37, Marco Spinetti <[email protected]> wrote:
I have a doubt about ho to set multiple cookies.
I'm using apache 2.2 and in my module handler I'm trying to set two
different cookies with:

apr_table_set(r->headers_out, "Set-Cookie", co);

apr_table_set(r->headers_out, "Set-Cookie", co1);

It seems that the second instruction override the first one.
So my question: how can I set two cookies in my module?

apr_table_addn(r->headers_out, "Set-Cookie", cookie);



Reply via email to