aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/magi/request.h3
-rw-r--r--include/magi/response.h18
2 files changed, 13 insertions, 8 deletions
diff --git a/include/magi/request.h b/include/magi/request.h
index 03e0c43..64e688d 100644
--- a/include/magi/request.h
+++ b/include/magi/request.h
@@ -39,9 +39,10 @@ typedef struct magi_request {
magi_params *body;
magi_files *files;
+ char *document_root;
char *method;
int is_secure;
- char *address;
+ char *host;
int port;
char *script;
char *path;
diff --git a/include/magi/response.h b/include/magi/response.h
index 4c6b788..52b1c9d 100644
--- a/include/magi/response.h
+++ b/include/magi/response.h
@@ -16,20 +16,24 @@
typedef void (*magi_response_method_head)(void *ud, magi_param *header);
+typedef void (*magi_response_method_start_body)(void *ud);
typedef void (*magi_response_method_body)(void *ud, const char *data, int len);
typedef void (*magi_response_method_file)(void *ud, FILE *file);
+typedef void (*magi_response_method_close)(void *ud);
typedef struct magi_response_methods {
- magi_response_method_head head;
- magi_response_method_body body;
- magi_response_method_file file;
+ magi_response_method_head head;
+ magi_response_method_start_body start_body;
+ magi_response_method_body body;
+ magi_response_method_file file;
+ magi_response_method_close close;
} magi_response_methods;
typedef struct magi_response_implementation {
- magi_response_methods *methods;
- void *userdata;
- magi_params *head[3];
- int head_done;
+ const magi_response_methods *methods;
+ void *userdata;
+ magi_params *head[3];
+ int head_done;
} magi_response_implementation;