diff src/http/ngx_http_write_filter_module.c @ 328:390b8f8309d6 NGINX_0_6_8

nginx 0.6.8 *) Change: now nginx tries to set the "worker_priority", "worker_rlimit_nofile", "worker_rlimit_core", and "worker_rlimit_sigpending" without super-user privileges. *) Change: now nginx escapes space and "%" in request to a mail proxy authentication server. *) Change: now nginx escapes "%" in $memcached_key variable. *) Bugfix: nginx used path relative to configuration prefix for non-absolute configuration file path specified in the "-c" key; bug appeared in 0.6.6. *) Bugfix: nginx did not work on FreeBSD/sparc64.
author Igor Sysoev <http://sysoev.ru>
date Mon, 20 Aug 2007 00:00:00 +0400
parents cba14c1e2a4b
children 5e3b425174f6
line wrap: on
line diff
--- a/src/http/ngx_http_write_filter_module.c
+++ b/src/http/ngx_http_write_filter_module.c
@@ -249,7 +249,10 @@ ngx_http_write_filter(ngx_http_request_t
         c->write->delayed = 1;
         ngx_add_timer(c->write, (ngx_msec_t) (sent * 1000 / r->limit_rate + 1));
 
-    } else if (c->write->ready && clcf->sendfile_max_chunk) {
+    } else if (c->write->ready
+               && clcf->sendfile_max_chunk
+               && c->sent - sent >= clcf->sendfile_max_chunk - 2 * ngx_pagesize)
+    {
         c->write->delayed = 1;
         ngx_add_timer(c->write, 1);
     }