comparison src/c/urweb.c @ 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 f9ffe8497742
children ea131de361d9
comparison
equal deleted inserted replaced
1670:6a1b54e84f82 1671:a54d223c3a7f
1312 const char *uw_Basis_get_script(uw_context ctx, uw_unit u) { 1312 const char *uw_Basis_get_script(uw_context ctx, uw_unit u) {
1313 return "<sc>"; 1313 return "<sc>";
1314 } 1314 }
1315 1315
1316 const char *uw_get_real_script(uw_context ctx) { 1316 const char *uw_get_real_script(uw_context ctx) {
1317 if (strstr(ctx->outHeaders.start, "Set-Cookie: ")) {
1318 uw_write_script(ctx, "sig=\"");
1319 uw_write_script(ctx, ctx->app->cookie_sig(ctx));
1320 uw_write_script(ctx, "\";");
1321 }
1322
1317 return ctx->script.start; 1323 return ctx->script.start;
1318 } 1324 }
1319 1325
1320 uw_Basis_string uw_Basis_maybe_onload(uw_context ctx, uw_Basis_string s) { 1326 uw_Basis_string uw_Basis_maybe_onload(uw_context ctx, uw_Basis_string s) {
1321 if (s[0] == 0) 1327 if (s[0] == 0)