summaryrefslogtreecommitdiff
path: root/source4/web_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-07 15:45:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:29 -0500
commita663d2110678b6c059737eecf7929cd5e5d46160 (patch)
tree3c97cdc3f2321d51e187812709124bd384ce90cd /source4/web_server
parent9811a3981bcc466726567aea4188a44c9fb07752 (diff)
downloadsamba-a663d2110678b6c059737eecf7929cd5e5d46160.tar.gz
samba-a663d2110678b6c059737eecf7929cd5e5d46160.tar.bz2
samba-a663d2110678b6c059737eecf7929cd5e5d46160.zip
r9183: more workarounds for the global variables in ejs. I will discuss getting rid of these
with the mbedthis people. (This used to be commit a5b9e74a5c23e724ae4ee222e6f128133b175494)
Diffstat (limited to 'source4/web_server')
-rw-r--r--source4/web_server/http.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index 61e6277800..7bb45afc1e 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -752,6 +752,7 @@ void http_process_input(struct websrv_context *web)
struct esp_data *edata = talloc_get_type(web->task->private, struct esp_data);
char *p;
void *save_mpr_ctx = mprMemCtx();
+ void *ejs_save = ejs_save_state();
int i;
const char *file_type = NULL;
BOOL esp_enable = False;
@@ -802,6 +803,7 @@ void http_process_input(struct websrv_context *web)
if (web->input.url == NULL) {
http_error(web, 400, "You must specify a GET or POST request");
mprSetCtx(save_mpr_ctx);
+ ejs_restore_state(ejs_save);
return;
}
@@ -811,6 +813,7 @@ void http_process_input(struct websrv_context *web)
if (!NT_STATUS_IS_OK(status)) {
http_error(web, 400, "Malformed POST data");
mprSetCtx(save_mpr_ctx);
+ ejs_restore_state(ejs_save);
return;
}
}
@@ -819,6 +822,7 @@ void http_process_input(struct websrv_context *web)
if (!NT_STATUS_IS_OK(status)) {
http_error(web, 400, "Malformed GET data");
mprSetCtx(save_mpr_ctx);
+ ejs_restore_state(ejs_save);
return;
}
}
@@ -899,6 +903,7 @@ void http_process_input(struct websrv_context *web)
talloc_free(esp);
mprSetCtx(save_mpr_ctx);
+ ejs_restore_state(ejs_save);
return;
internal_error:
@@ -906,6 +911,7 @@ internal_error:
talloc_free(esp);
http_error(web, 500, "Internal server error");
mprSetCtx(save_mpr_ctx);
+ ejs_restore_state(ejs_save);
}