summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-07 15:20:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:29 -0500
commit9811a3981bcc466726567aea4188a44c9fb07752 (patch)
treef89e6eaa201575ba4373e4a7e7a31d8aa1d353c0
parente49aeef2323b8432133e502152796b97119890d5 (diff)
downloadsamba-9811a3981bcc466726567aea4188a44c9fb07752.tar.gz
samba-9811a3981bcc466726567aea4188a44c9fb07752.tar.bz2
samba-9811a3981bcc466726567aea4188a44c9fb07752.zip
r9179: cope with simultaneous web requests using the same session variable
(This used to be commit 7d6e6012198d6fd3770da22ec5e1770c9bcd4ed7)
-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 59bef468dd..61e6277800 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -751,6 +751,7 @@ void http_process_input(struct websrv_context *web)
struct esp_state *esp;
struct esp_data *edata = talloc_get_type(web->task->private, struct esp_data);
char *p;
+ void *save_mpr_ctx = mprMemCtx();
int i;
const char *file_type = NULL;
BOOL esp_enable = False;
@@ -800,6 +801,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);
return;
}
@@ -808,6 +810,7 @@ void http_process_input(struct websrv_context *web)
status = http_parse_post(esp);
if (!NT_STATUS_IS_OK(status)) {
http_error(web, 400, "Malformed POST data");
+ mprSetCtx(save_mpr_ctx);
return;
}
}
@@ -815,6 +818,7 @@ void http_process_input(struct websrv_context *web)
status = http_parse_get(esp);
if (!NT_STATUS_IS_OK(status)) {
http_error(web, 400, "Malformed GET data");
+ mprSetCtx(save_mpr_ctx);
return;
}
}
@@ -894,12 +898,14 @@ void http_process_input(struct websrv_context *web)
}
talloc_free(esp);
+ mprSetCtx(save_mpr_ctx);
return;
internal_error:
mprSetCtx(esp);
talloc_free(esp);
http_error(web, 500, "Internal server error");
+ mprSetCtx(save_mpr_ctx);
}