Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed sendfile() trailers on OS X (8e903522c17a, 1.7.8).

Maxim Dounin
January 13, 2015 11:50AM
details: http://hg.nginx.org/nginx/rev/7554c83287dc
branches:
changeset: 5961:7554c83287dc
user: Maxim Dounin <mdounin@mdounin.ru>
date: Tue Jan 13 18:58:23 2015 +0300
description:
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).

diffstat:

src/os/unix/ngx_darwin_sendfile_chain.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff --git a/src/os/unix/ngx_darwin_sendfile_chain.c b/src/os/unix/ngx_darwin_sendfile_chain.c
--- 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
}

send += trailer.size;
+
+ } else {
+ trailer.count = 0;
}

/*

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Fixed sendfile() trailers on OS X (8e903522c17a, 1.7.8).

Maxim Dounin 1026 January 13, 2015 11:50AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready