Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2015-01-13 18:58:23 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2015-01-13 18:58:23 +0300
commit2754fd3c803cce0ae7caf1a2ce2ada7e88e60b1b (patch)
tree30f25664294706f615dc15d52824bf1c95f651f6
parent843fb552ecf53836b5205bec26513cba46ca59f8 (diff)
Fixed sendfile() trailers on OS X (8e903522c17a, 1.7.8).
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).
-rw-r--r--src/os/unix/ngx_darwin_sendfile_chain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/unix/ngx_darwin_sendfile_chain.c b/src/os/unix/ngx_darwin_sendfile_chain.c
index f01651a11..c802e9f9a 100644
--- a/src/os/unix/ngx_darwin_sendfile_chain.c
+++ b/src/os/unix/ngx_darwin_sendfile_chain.c
@@ -111,6 +111,9 @@ ngx_darwin_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
}
send += trailer.size;
+
+ } else {
+ trailer.count = 0;
}
/*