diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-08-11 18:04:04 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-08-11 18:04:04 +0300 |
commit | 39a6a4c973dd378f1fad9d2514d7857fe491df4b (patch) | |
tree | 220ea8605a9396a93fa7a459ff3e558fe1a044aa /src/nxt_application.h | |
parent | e1e808bd94609c80b4990939285d47f124bb2eef (diff) | |
download | unit-39a6a4c973dd378f1fad9d2514d7857fe491df4b.tar.gz unit-39a6a4c973dd378f1fad9d2514d7857fe491df4b.tar.bz2 |
Request body read state implemented.
With specific timeout and buffer size settings.
Diffstat (limited to 'src/nxt_application.h')
-rw-r--r-- | src/nxt_application.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/nxt_application.h b/src/nxt_application.h index f27f90cd..9efb5008 100644 --- a/src/nxt_application.h +++ b/src/nxt_application.h @@ -84,12 +84,17 @@ typedef struct { off_t parsed_content_length; nxt_bool_t done; + + size_t bufs; + nxt_buf_t *buf; } nxt_app_request_header_t; typedef struct { - nxt_str_t preread; + size_t preread_size; nxt_bool_t done; + + nxt_buf_t *buf; } nxt_app_request_body_t; @@ -112,8 +117,12 @@ struct nxt_app_parse_ctx_s { nxt_int_t nxt_app_http_req_init(nxt_task_t *task, nxt_app_parse_ctx_t *ctx); -nxt_int_t nxt_app_http_req_parse(nxt_task_t *task, nxt_app_parse_ctx_t *ctx, - nxt_buf_t *buf); +nxt_int_t nxt_app_http_req_header_parse(nxt_task_t *task, + nxt_app_parse_ctx_t *ctx, nxt_buf_t *buf); + +nxt_int_t nxt_app_http_req_body_read(nxt_task_t *task, + nxt_app_parse_ctx_t *ctx, nxt_buf_t *buf); + nxt_int_t nxt_app_http_req_done(nxt_task_t *task, nxt_app_parse_ctx_t *ctx); @@ -178,6 +187,9 @@ nxt_int_t nxt_app_msg_write_raw(nxt_task_t *task, nxt_app_wmsg_t *msg, nxt_int_t nxt_app_msg_read_str(nxt_task_t *task, nxt_app_rmsg_t *msg, nxt_str_t *str); +size_t nxt_app_msg_read_raw(nxt_task_t *task, nxt_app_rmsg_t *msg, void *buf, + size_t size); + nxt_int_t nxt_app_msg_read_nvp(nxt_task_t *task, nxt_app_rmsg_t *rmsg, nxt_str_t *n, nxt_str_t *v); |