diff options
author | Max Romanov <max.romanov@nginx.com> | 2018-02-07 13:47:04 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2018-02-07 13:47:04 +0300 |
commit | d2c85a2d9e491a08222272b88b20c9398e06449b (patch) | |
tree | e4e1e50b9506aab423482d50024f922839a74981 /src/nxt_router.c | |
parent | 79259d1ebd5b275b723ed2fcfb1f0a3921516c88 (diff) | |
download | unit-d2c85a2d9e491a08222272b88b20c9398e06449b.tar.gz unit-d2c85a2d9e491a08222272b88b20c9398e06449b.tar.bz2 |
Fixed processing of application response in router.
If the first buffer contained only header and there were other buffers in chain,
those buffers were not processed. In particular, this broke Perl application
responses with empty body.
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r-- | src/nxt_router.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index 5fbdeded..69c7ddfd 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -2677,7 +2677,10 @@ nxt_router_response_ready_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg, nxt_work_queue_add(&task->thread->engine->fast_work_queue, b->completion_handler, task, b, b->parent); - } else { + b = b->next; + } + + if (b != NULL) { nxt_buf_chain_add(&r->out, b); } |