summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-01-10 15:34:18 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-01-10 15:34:18 -0500
commitddfac6ea0b6e396268f4d4288888445c521cbf9d (patch)
tree7ee6531ed431e89ace88b1024a2c893c91adbe0c /src
parent648556747082ff05d6f252ca251ad68cbf19c329 (diff)
Properly handle case where an RPC changes signed cookie state
Diffstat (limited to 'src')
-rw-r--r--src/c/urweb.c6
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;
}