# HG changeset patch # User Adam Chlipala # Date 1326227658 18000 # Node ID a54d223c3a7fe8979a5d9f08abe91dd7ebf185a0 # Parent 6a1b54e84f827f0a842dc6f7aef975f892676145 Properly handle case where an RPC changes signed cookie state diff -r 6a1b54e84f82 -r a54d223c3a7f src/c/urweb.c --- a/src/c/urweb.c Tue Jan 10 10:10:51 2012 -0500 +++ b/src/c/urweb.c Tue Jan 10 15:34:18 2012 -0500 @@ -1314,6 +1314,12 @@ } 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; }