diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-03-09 20:17:28 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-03-09 20:17:28 +0300 |
commit | 5cfe6cdf6af2d630d21871f9193fc1b4a7db24ff (patch) | |
tree | b50c9c0936a8dab87519dcd9e47ed40759d7eddc /include | |
parent | 18ce121d4243358bc55a0474a529efe2580a0610 (diff) | |
download | magi-5cfe6cdf6af2d630d21871f9193fc1b4a7db24ff.tar magi-5cfe6cdf6af2d630d21871f9193fc1b4a7db24ff.tar.xz magi-5cfe6cdf6af2d630d21871f9193fc1b4a7db24ff.zip |
[magi]
Diffstat (limited to 'include')
-rw-r--r-- | include/magi/request.h | 3 | ||||
-rw-r--r-- | include/magi/response.h | 18 |
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; |