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/nginext/nxt_go_port.c | |
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/nginext/nxt_go_port.c')
-rw-r--r-- | src/nginext/nxt_go_port.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nginext/nxt_go_port.c b/src/nginext/nxt_go_port.c index af50b860..fca3cf9a 100644 --- a/src/nginext/nxt_go_port.c +++ b/src/nginext/nxt_go_port.c @@ -83,22 +83,23 @@ nxt_go_data_handler(nxt_port_msg_t *port_msg, size_t size) do { rc = nxt_go_ctx_read_str(ctx, &n); - rc = nxt_go_ctx_read_str(ctx, &v); if (n.length == 0) { break; } + rc = nxt_go_ctx_read_str(ctx, &v); nxt_go_request_add_header(r, nxt_go_str(&n), nxt_go_str(&v)); } while(1); - ctx->r.body.preread = v; + nxt_go_ctx_read_size(ctx, &s); + ctx->r.body.preread_size = s; if (h->parsed_content_length > 0) { nxt_go_request_set_content_length(r, h->parsed_content_length); } - if (v.length < h->parsed_content_length) { + if (ctx->r.body.preread_size < h->parsed_content_length) { nxt_go_request_create_channel(r); } |