From ddfac6ea0b6e396268f4d4288888445c521cbf9d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 10 Jan 2012 15:34:18 -0500 Subject: Properly handle case where an RPC changes signed cookie state --- src/c/urweb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/c') diff --git a/src/c/urweb.c b/src/c/urweb.c index 1a185b51..1a193c53 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -1314,6 +1314,12 @@ const char *uw_Basis_get_script(uw_context ctx, uw_unit u) { } const char *uw_get_real_script(uw_context ctx) { + if (strstr(ctx->outHeaders.start, "Set-Cookie: ")) { + uw_write_script(ctx, "sig=\""); + uw_write_script(ctx, ctx->app->cookie_sig(ctx)); + uw_write_script(ctx, "\";"); + } + return ctx->script.start; } -- cgit v1.2.3