Welcome! Log In Create A New Profile

Advanced

[PATCH 2 of 4] Fix aio sendfile unintentional usage

Maxim Dounin
October 11, 2010 09:06AM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1286639232 -14400
# Node ID df8478252f31d878b6dc0082a425c9398649df2b
# Parent 38a938ce08300bb57d0f6c885b1d8c35d602419d
Fix aio sendfile unintentional usage.

Always set c->aio_sendfile to make sure it will be cleared from previous
requests in the same connection.

Reported by: Oleksandr V. Typlyns'kyi

diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c
--- a/src/http/ngx_http_copy_filter_module.c
+++ b/src/http/ngx_http_copy_filter_module.c
@@ -118,8 +118,10 @@ ngx_http_copy_filter(ngx_http_request_t
ctx->filter_ctx = r;

#if (NGX_HAVE_FILE_AIO)
- if (ngx_file_aio && clcf->aio) {
- ctx->aio_handler = ngx_http_copy_aio_handler;
+ if (ngx_file_aio) {
+ if (clcf->aio) {
+ ctx->aio_handler = ngx_http_copy_aio_handler;
+ }
#if (NGX_HAVE_AIO_SENDFILE)
c->aio_sendfile = (clcf->aio == NGX_HTTP_AIO_SENDFILE);
#endif

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

[PATCH 2 of 4] Fix aio sendfile unintentional usage

Maxim Dounin 2146 October 11, 2010 09:06AM



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

Online Users

Guests: 188
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