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.
This commit is contained in:
Max Romanov
2018-02-07 13:47:04 +03:00
parent 79259d1ebd
commit d2c85a2d9e

View File

@@ -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);
}