comparison src/c/urweb.c @ 1461:fb88d64abec8

Prevent early clearing of context post data
author Adam Chlipala <adam@chlipala.net>
date Sun, 22 May 2011 13:32:29 -0400
parents aa2398e58306
children 2f5fd248588d
comparison
equal deleted inserted replaced
1460:4f4f104259fb 1461:fb88d64abec8
598 ctx->used_deltas = 0; 598 ctx->used_deltas = 0;
599 ctx->client = NULL; 599 ctx->client = NULL;
600 ctx->cur_container = NULL; 600 ctx->cur_container = NULL;
601 ctx->used_transactionals = 0; 601 ctx->used_transactionals = 0;
602 ctx->script_header = ""; 602 ctx->script_header = "";
603 ctx->hasPostBody = 0;
604 ctx->queryString = NULL; 603 ctx->queryString = NULL;
605 } 604 }
606 605
607 void uw_reset_keep_request(uw_context ctx) { 606 void uw_reset_keep_request(uw_context ctx) {
608 uw_reset_keep_error_message(ctx); 607 uw_reset_keep_error_message(ctx);
612 void uw_reset(uw_context ctx) { 611 void uw_reset(uw_context ctx) {
613 uw_reset_keep_request(ctx); 612 uw_reset_keep_request(ctx);
614 if (ctx->app) 613 if (ctx->app)
615 memset(ctx->inputs, 0, ctx->app->inputs_len * sizeof(input)); 614 memset(ctx->inputs, 0, ctx->app->inputs_len * sizeof(input));
616 memset(ctx->subinputs, 0, ctx->n_subinputs * sizeof(input)); 615 memset(ctx->subinputs, 0, ctx->n_subinputs * sizeof(input));
617 ctx->used_subinputs = 0; 616 ctx->used_subinputs = ctx->hasPostBody = ctx->isPost = 0;
618 ctx->isPost = 0;
619 } 617 }
620 618
621 failure_kind uw_begin_init(uw_context ctx) { 619 failure_kind uw_begin_init(uw_context ctx) {
622 int r = setjmp(ctx->jmp_buf); 620 int r = setjmp(ctx->jmp_buf);
623 621