summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2018-01-11 09:49:35 +0300
committerIgor Sysoev <igor@sysoev.ru>2018-01-11 09:49:35 +0300
commitb09227fa5c5f4b509d9e57da67b0ee79780a9877 (patch)
treede32ffa33ebfaca62a69a0cacbfad8bad722b11d /src/nxt_http_request.c
parent470948a0d65fb65ff58fc185af12e5ece8e1ae4c (diff)
downloadunit-b09227fa5c5f4b509d9e57da67b0ee79780a9877.tar.gz
unit-b09227fa5c5f4b509d9e57da67b0ee79780a9877.tar.bz2
HTTP: request body was not passed to application.
The bug has appeared in changeset 5817734dd9b9.
Diffstat (limited to 'src/nxt_http_request.c')
-rw-r--r--src/nxt_http_request.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c
index 808cd75b..89780454 100644
--- a/src/nxt_http_request.c
+++ b/src/nxt_http_request.c
@@ -218,6 +218,11 @@ nxt_http_app_request(nxt_task_t *task, void *obj, void *data)
ar->r.header.cookie.start = r->cookie->value;
}
+ if (r->body != NULL) {
+ ar->r.body.buf = r->body;
+ ar->r.body.preread_size = r->content_length_n;
+ }
+
ar->r.body.done = 1;
ret = nxt_http_parse_request_init(&ar->resp_parser, r->mem_pool);