summaryrefslogtreecommitdiffhomepage
path: root/src/os/unix/ngx_darwin_sendfile_chain.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-01-13Fixed sendfile() trailers on OS X (8e903522c17a, 1.7.8).Maxim Dounin1-0/+3
The trailer.count variable was not initialized if there was a header, resulting in "sendfile() failed (22: Invalid argument)" alerts on OS X if the "sendfile" directive was used. The bug was introduced in 8e903522c17a (1.7.8).
2014-11-19Style.Valentin Bartenev1-2/+2
2014-08-13Moved writev() handling code to a separate function.Valentin Bartenev1-24/+5
This reduces code duplication and unifies debug logging of the writev() syscall among various send chain functions.
2014-08-13Merged conditions in the ngx_*_sendfile_chain() functions.Valentin Bartenev1-13/+10
No functional changes.
2014-08-13Moved the code for coalescing file buffers to a separate function.Valentin Bartenev1-24/+3
2014-10-07Introduced the ngx_output_chain_to_iovec() function.Valentin Bartenev1-102/+24
It deduplicates code of the send chain functions and uses only preallocated memory, which completely solves the problem mentioned in d1bde5c3c5d2.
2014-11-19Renamed ngx_handle_sent_chain() to ngx_chain_update_sent().Valentin Bartenev1-1/+1
No functional changes.
2014-08-27Fixed counting of sent bytes in the send chain functions on EINTR.Valentin Bartenev1-0/+1
Previously, a value of the "send" variable wasn't properly adjusted in a rare case when syscall was interrupted by a signal. As a result, these functions could send less data than the limit allows.
2014-08-13Generalized definitions of the number of preallocated iovec's.Valentin Bartenev1-12/+5
No functional changes.
2014-08-13Removed the "complete" variable from various send chain functions.Valentin Bartenev1-7/+2
It was made redundant by the previous change, since the "sent" variable is no longer modified.
2014-08-13Moved the code for adjusting sent buffers in a separate function.Valentin Bartenev1-36/+1
2014-08-13Fixed writev() debug log message in ngx_darwin_sendfile_chain().Valentin Bartenev1-1/+1
2014-06-19FreeBSD has migrated to Bugzilla.Sergey Kandaurov1-1/+1
2013-08-08Don't lose pointer to first nonempty buf in ngx_*_sendfile_chain().Gleb Smirnoff1-16/+14
In ngx_*_sendfile_chain() when calculating pointer to a first non-zero sized buf, use "in" as iterator. This fixes processing of zero sized buf(s) after EINTR. Otherwise function can return zero sized buf to caller, and later ngx_http_write_filter() logs warning.
2012-04-17IOV_MAX handling microoptimization.Maxim Dounin1-5/+11
We now stop on IOV_MAX iovec entries only if we are going to add new one, i.e. next buffer can't be coalesced into last iovec. This also fixes incorrect checks for trailer creation on FreeBSD and Mac OS X, header.nelts was checked instead of trailer.nelts.
2012-02-28Fixed spelling in single-line comments.Ruslan Ermilov1-1/+1
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2009-08-30refactor EAGAIN/EINTR processingIgor Sysoev1-19/+21
2008-07-30*) move Darwin support to separate filesIgor Sysoev1-0/+363
*) Darwin sendfile() support