trailer.nalloc = NGX_IOVS_PREALLOCATE;
for ( ;; ) {
- file = NULL;
- file_size = 0;
eintr = 0;
prev_send = send;
file_size = ngx_chain_coalesce_file(&cl, limit - send);
send += file_size;
- }
-
- if (file && header.count == 0) {
- /* create the trailer iovec and coalesce the neighbouring bufs */
+ if (header.count == 0) {
- cl = ngx_output_chain_to_iovec(&trailer, cl, limit - send, c->log);
+ /*
+ * create the trailer iovec and coalesce the neighbouring bufs
+ */
- if (cl == NGX_CHAIN_ERROR) {
- return NGX_CHAIN_ERROR;
- }
+ cl = ngx_output_chain_to_iovec(&trailer, cl, limit - send, c->log);
- send += trailer.size;
- }
+ if (cl == NGX_CHAIN_ERROR) {
+ return NGX_CHAIN_ERROR;
+ }
- if (file) {
+ send += trailer.size;
+ }
/*
* sendfile() returns EINVAL if sf_hdtr's count is 0,
trailer.nalloc = NGX_IOVS_PREALLOCATE;
for ( ;; ) {
- file = NULL;
- file_size = 0;
eintr = 0;
prev_send = send;
file_size = (size_t) ngx_chain_coalesce_file(&cl, limit - send);
send += file_size;
- }
-
-
- if (file) {
/* create the trailer iovec and coalesce the neighbouring bufs */
}
send += trailer.size;
- }
-
- if (file) {
if (ngx_freebsd_use_tcp_nopush
&& c->tcp_nopush == NGX_TCP_NOPUSH_UNSET)