Mercurial > urweb
changeset 1671:a54d223c3a7f
Properly handle case where an RPC changes signed cookie state
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 10 Jan 2012 15:34:18 -0500 |
parents | 6a1b54e84f82 |
children | ea131de361d9 |
files | src/c/urweb.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; }