On Saturday, Jan 3, 2004, at 13:18 Europe/London, Andrey Brindeew wrote:


Hi!

I tried to set up some cookies from template (I'm using
Apache::Template) and failed: only last cookie was really installed in
browser.

This is simple testcase:

<html>
<head><title>Cookie test</title></head>
<body>[%

CALL request.header_out('Set-Cookie',"a=1; path=/; expires=Tue, 31-Dec-2030 23:59:59 GMT;");
CALL request.header_out('Set-Cookie',"b=2; path=/; expires=Tue, 31-Dec-2030 23:59:59 GMT;");
CALL request.header_out('Set-Cookie',"c=3; path=/; expires=Tue, 31-Dec-2030 23:59:59 GMT;");
CALL request.header_out('Set-Cookie',"d=4; path=/; expires=Tue, 31-Dec-2030 23:59:59 GMT;");
CALL request.header_out('Set-Cookie',"e=5; path=/; expires=Tue, 31-Dec-2030 23:59:59 GMT;");


%]</body>
</html>

Аfter viewing this page only 'e' cookie exists in browser. Value is valid.

How can I set up multiple cookies from template in same request?

At a complete guess, use a hash or an array of cookies?



_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to