changeset 1417:d0786ff9bb22

Fix detection of POSTs to error pages
author Adam Chlipala <adam@chlipala.net>
date Sun, 23 Jan 2011 17:27:51 -0500
parents a8606c1cfe87
children 22674ac8ebe6
files src/c/request.c src/c/urweb.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/c/request.c	Sun Jan 23 15:49:35 2011 -0500
+++ b/src/c/request.c	Sun Jan 23 17:27:51 2011 -0500
@@ -200,6 +200,7 @@
   int had_error = 0;
   char errmsg[ERROR_BUF_LEN];
 
+  uw_reset(ctx);
   rc->queryString[0] = 0;
 
   for (s = path; *s; ++s) {
--- a/src/c/urweb.c	Sun Jan 23 15:49:35 2011 -0500
+++ b/src/c/urweb.c	Sun Jan 23 17:27:51 2011 -0500
@@ -590,7 +590,7 @@
   ctx->cur_container = NULL;
   ctx->used_transactionals = 0;
   ctx->script_header = "";
-  ctx->isPost = ctx->hasPostBody = 0;
+  ctx->hasPostBody = 0;
   ctx->queryString = NULL;
 }
 
@@ -605,6 +605,7 @@
     memset(ctx->inputs, 0, ctx->app->inputs_len * sizeof(input));
   memset(ctx->subinputs, 0, ctx->n_subinputs * sizeof(input));
   ctx->used_subinputs = 0;
+  ctx->isPost = 0;
 }
 
 failure_kind uw_begin_init(uw_context ctx) {