diff options
Diffstat (limited to 'source4/web_server/web_server.h')
-rw-r--r-- | source4/web_server/web_server.h | 51 |
1 files changed, 19 insertions, 32 deletions
diff --git a/source4/web_server/web_server.h b/source4/web_server/web_server.h index 52aff05dcc..f91c766494 100644 --- a/source4/web_server/web_server.h +++ b/source4/web_server/web_server.h @@ -19,13 +19,28 @@ #include "smbd/process_model.h" +struct websrv_context; + +struct web_server_data { + struct tls_params *tls_params; + void (*http_process_input)(struct web_server_data *wdata, + struct websrv_context *web); + void *private; +}; + +struct http_header { + char *name; + char *value; + struct http_header *prev, *next; +}; + /* context of one open web connection */ struct websrv_context { struct task_server *task; struct stream_connection *conn; - struct { + struct websrv_request_input { bool tls_detect; bool tls_first_char; uint8_t first_byte; @@ -34,45 +49,17 @@ struct websrv_context { char *url; unsigned content_length; bool post_request; - const char *content_type; - const char *query_string; - const char *user_agent; - const char *referer; - const char *host; - const char *accept_encoding; - const char *accept_language; - const char *accept_charset; - const char *cookie; - const char *session_key; + struct http_header *headers; } input; - struct { + struct websrv_request_output { bool output_pending; DATA_BLOB content; - int fd; + bool headers_sent; unsigned nsent; - int response_code; - const char **headers; } output; 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; - struct tls_params *tls_params; -}; - #include "web_server/proto.h" |