Fixed loop in ngx_writev_chain() and ngx_solaris_sendfilev_chain(). The "complete" flag wasn't cleared on loop iteration start, resulting in broken behaviour if there were more than IOV_MAX buffers and first iteration was fully completed (and hence the "complete" flag was set to 1).
diff --git a/src/os/unix/ngx_solaris_sendfilev_chain.c b/src/os/unix/ngx_solaris_sendfilev_chain.c index d68220d..64e59aa 100644 --- a/src/os/unix/ngx_solaris_sendfilev_chain.c +++ b/src/os/unix/ngx_solaris_sendfilev_chain.c
@@ -74,7 +74,6 @@ send = 0; - complete = 0; vec.elts = sfvs; vec.size = sizeof(sendfilevec_t); @@ -87,6 +86,7 @@ fprev = 0; sfv = NULL; eintr = 0; + complete = 0; sent = 0; prev_send = send;
diff --git a/src/os/unix/ngx_writev_chain.c b/src/os/unix/ngx_writev_chain.c index 579fdec..a752b1f 100644 --- a/src/os/unix/ngx_writev_chain.c +++ b/src/os/unix/ngx_writev_chain.c
@@ -54,7 +54,6 @@ } send = 0; - complete = 0; vec.elts = iovs; vec.size = sizeof(struct iovec); @@ -65,6 +64,7 @@ prev = NULL; iov = NULL; eintr = 0; + complete = 0; prev_send = send; vec.nelts = 0;