summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-01-23 17:27:51 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-01-23 17:27:51 -0500
commit2fc1b44bdddc7bdb99cd94849f7372fd427481f1 (patch)
tree9724751d96157d3939353f261b24a9906ddc441c /src
parent4919847f21ac332a13a70093cd8827f51ed404b4 (diff)
Fix detection of POSTs to error pages
Diffstat (limited to 'src')
-rw-r--r--src/c/request.c1
-rw-r--r--src/c/urweb.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/c/request.c b/src/c/request.c
index 60836b35..4372c074 100644
--- a/src/c/request.c
+++ b/src/c/request.c
@@ -200,6 +200,7 @@ request_result uw_request(uw_request_context rc, uw_context ctx,
int had_error = 0;
char errmsg[ERROR_BUF_LEN];
+ uw_reset(ctx);
rc->queryString[0] = 0;
for (s = path; *s; ++s) {
diff --git a/src/c/urweb.c b/src/c/urweb.c
index ce8a8b1b..67df7a2e 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -590,7 +590,7 @@ void uw_reset_keep_error_message(uw_context ctx) {
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 @@ void uw_reset(uw_context ctx) {
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) {