diff options
author | 2012-01-10 15:34:18 -0500 | |
---|---|---|
committer | 2012-01-10 15:34:18 -0500 | |
commit | 8107368cf21db442473f7dcde20240688c6f156b (patch) | |
tree | 7ee6531ed431e89ace88b1024a2c893c91adbe0c | |
parent | ec50d544e32cd9c92d1333ebc6f76c5e6ed95774 (diff) |
Properly handle case where an RPC changes signed cookie state
-rw-r--r-- | src/c/urweb.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |