r22476: The OID match is used very oddly in AD, as it is often used for fields
[Samba.git] / source / web_server / web_server.h
blobf64a946bee22f9e87946bda6bd43582fe437f2a6
1 /*
2 Unix SMB/CIFS implementation.
4 Copyright (C) Andrew Tridgell 2005
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include "smbd/process_model.h"
24 context of one open web connection
26 struct websrv_context {
27 struct task_server *task;
28 struct stream_connection *conn;
29 struct {
30 BOOL tls_detect;
31 BOOL tls_first_char;
32 uint8_t first_byte;
33 DATA_BLOB partial;
34 BOOL end_of_headers;
35 char *url;
36 unsigned content_length;
37 BOOL post_request;
38 const char *content_type;
39 const char *query_string;
40 const char *user_agent;
41 const char *referer;
42 const char *host;
43 const char *accept_encoding;
44 const char *accept_language;
45 const char *accept_charset;
46 const char *cookie;
47 const char *session_key;
48 } input;
49 struct {
50 BOOL output_pending;
51 DATA_BLOB content;
52 int fd;
53 unsigned nsent;
54 int response_code;
55 const char **headers;
56 } output;
57 struct session_data *session;
62 context for long term storage in the web server, to support session[]
63 and application[] data. Stored in task->private.
65 struct esp_data {
66 struct session_data {
67 struct session_data *next, *prev;
68 struct esp_data *edata;
69 const char *id;
70 struct MprVar *data;
71 struct timed_event *te;
72 int lifetime;
73 } *sessions;
74 struct MprVar *application_data;
75 struct tls_params *tls_params;
78 #include "web_server/proto.h"