summaryrefslogtreecommitdiff
path: root/source4/web_server/web_server.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-27 11:57:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:06 -0500
commitebb0b35242f5c2967afdba9e746679bc87c5b745 (patch)
tree9ebe0df98f2ab83dc595c84015879400b56184c2 /source4/web_server/web_server.h
parent631f9782a6f499b14aad035f1eee5b2aab18878c (diff)
downloadsamba-ebb0b35242f5c2967afdba9e746679bc87c5b745.tar.gz
samba-ebb0b35242f5c2967afdba9e746679bc87c5b745.tar.bz2
samba-ebb0b35242f5c2967afdba9e746679bc87c5b745.zip
r7013: added tls support to the builtin web server. It auto-detects if the client
is using tls by looking at the first byte on the connection. This allows both https and http services to be on the same port (This used to be commit 6369dfb6585ce4d4e3028c557395f2d73c290c92)
Diffstat (limited to 'source4/web_server/web_server.h')
-rw-r--r--source4/web_server/web_server.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/web_server/web_server.h b/source4/web_server/web_server.h
index f23ea90d55..53f97964f1 100644
--- a/source4/web_server/web_server.h
+++ b/source4/web_server/web_server.h
@@ -28,6 +28,9 @@ struct websrv_context {
struct task_server *task;
struct stream_connection *conn;
struct {
+ BOOL tls_detect;
+ BOOL tls_first_char;
+ uint8_t first_byte;
DATA_BLOB partial;
BOOL end_of_headers;
char *url;
@@ -45,13 +48,32 @@ struct websrv_context {
const char *session_key;
} input;
struct {
+ BOOL output_pending;
DATA_BLOB content;
int fd;
unsigned nsent;
int response_code;
const char **headers;
} output;
+ void *tls_session;
struct session_data *session;
};
+/*
+ context for long term storage in the web server, to support session[]
+ and application[] data. Stored in task->private.
+*/
+struct esp_data {
+ struct session_data {
+ struct session_data *next, *prev;
+ struct esp_data *edata;
+ const char *id;
+ struct MprVar *data;
+ struct timed_event *te;
+ int lifetime;
+ } *sessions;
+ struct MprVar *application_data;
+ void *tls_data;
+};
+