summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_application.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-08-11 18:04:04 +0300
committerMax Romanov <max.romanov@nginx.com>2017-08-11 18:04:04 +0300
commit39a6a4c973dd378f1fad9d2514d7857fe491df4b (patch)
tree220ea8605a9396a93fa7a459ff3e558fe1a044aa /src/nxt_application.h
parente1e808bd94609c80b4990939285d47f124bb2eef (diff)
downloadunit-39a6a4c973dd378f1fad9d2514d7857fe491df4b.tar.gz
unit-39a6a4c973dd378f1fad9d2514d7857fe491df4b.tar.bz2
Request body read state implemented.
With specific timeout and buffer size settings.
Diffstat (limited to '')
-rw-r--r--src/nxt_application.h18
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);