diff src/core/ngx_output_chain.c @ 306:55328d69b335 NGINX_0_5_23

nginx 0.5.23 *) Feature: the ngx_http_ssl_module supports Server Name Indication TLS extension. *) Feature: the "fastcgi_catch_stderr" directive. Thanks to Nick S. Grechukh, OWOX project. *) Bugfix: a segmentation fault occurred in master process if two virtual servers should bind() to the overlapping ports. *) Bugfix: if nginx was built with ngx_http_perl_module and perl supported threads, then during second reconfiguration the error messages "panic: MUTEX_LOCK" and "perl_parse() failed" were issued. *) Bugfix: in the HTTPS protocol in the "proxy_pass" directive.
author Igor Sysoev <http://sysoev.ru>
date Mon, 04 Jun 2007 00:00:00 +0400
parents e4f4cbfed5f5
children 94e16de3c33f
line wrap: on
line diff
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -377,8 +377,9 @@ ngx_output_chain_copy_buf(ngx_buf_t *dst
             dst->in_file = 0;
         }
 
-        if (src->last_buf && src->pos == src->last) {
-            dst->last_buf = 1;
+        if (src->pos == src->last) {
+            dst->flush = src->flush;
+            dst->last_buf = src->last_buf;
         }
 
     } else {
@@ -417,8 +418,9 @@ ngx_output_chain_copy_buf(ngx_buf_t *dst
 
         src->file_pos += n;
 
-        if (src->last_buf && src->file_pos == src->file_last) {
-            dst->last_buf = 1;
+        if (src->pos == src->last) {
+            dst->flush = src->flush;
+            dst->last_buf = src->last_buf;
         }
     }
 
@@ -444,8 +446,9 @@ ngx_chain_writer(void *data, ngx_chain_t
 
         size += ngx_buf_size(in->buf);
 
-        ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0,
-                       "chain writer buf size: %uO", ngx_buf_size(in->buf));
+        ngx_log_debug2(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0,
+                       "chain writer buf fl:%d s:%uO",
+                       in->buf->flush, ngx_buf_size(in->buf));
 
         cl = ngx_alloc_chain_link(ctx->pool);
         if (cl == NULL) {