From fc45b63e478f6f891f0d04bf49423be30a63617d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 27 May 2005 00:29:58 +0000 Subject: r6998: - added support for application[] data, which is global to all clients using the web server. This allows for things like application['state'] = "shuttting down" and then every web client can see that the server is going down - added support for session[] data. This allows web pages to store long term data specific to this client. It relies on cookies. Sessions auto timeout (default timeout 5 minutes). The timeout can be set in the scripts. - changed from processing all .html files as esp, to only processing .esp files as esp. This makes it easier to compare the samba web server to appWeb as a reference implementation. - expanded the number of standard variables setup by esp. See the showvars.esp example page for all variables. (This used to be commit c418b23c2ea383da8fad21b62213ec01fd135ebb) --- source4/web_server/web_server.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/web_server/web_server.c') diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c index 656e101c11..9bbf423d29 100644 --- a/source4/web_server/web_server.c +++ b/source4/web_server/web_server.c @@ -169,11 +169,13 @@ static void websrv_send(struct stream_connection *conn, uint16_t flags) */ static void websrv_accept(struct stream_connection *conn) { + struct task_server *task = talloc_get_type(conn->private, struct task_server); struct websrv_context *web; web = talloc_zero(conn, struct websrv_context); if (web == NULL) goto failed; + web->task = task; web->conn = conn; conn->private = web; web->output.fd = -1; @@ -228,6 +230,11 @@ static void websrv_task_init(struct task_server *task) if (!NT_STATUS_IS_OK(status)) goto failed; } + /* startup the esp processor - unfortunately we can't do this + per connection as that wouldn't allow for session variables */ + status = http_setup_esp(task); + if (!NT_STATUS_IS_OK(status)) goto failed; + return; failed: -- cgit