Author: tridge Date: 2005-08-07 15:20:25 +0000 (Sun, 07 Aug 2005) New Revision: 9179
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9179 Log: cope with simultaneous web requests using the same session variable Modified: branches/SAMBA_4_0/source/web_server/http.c Changeset: Modified: branches/SAMBA_4_0/source/web_server/http.c =================================================================== --- branches/SAMBA_4_0/source/web_server/http.c 2005-08-07 07:01:03 UTC (rev 9178) +++ branches/SAMBA_4_0/source/web_server/http.c 2005-08-07 15:20:25 UTC (rev 9179) @@ -751,6 +751,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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); }
