diff src/core/ngx_output_chain.c @ 146:36af50a5582d NGINX_0_3_20

nginx 0.3.20 *) Bugfix: in SSI handling. *) Bugfix: the ngx_http_memcached_module did not support the keys in the "/usr?args" form.
author Igor Sysoev <http://sysoev.ru>
date Wed, 11 Jan 2006 00:00:00 +0300
parents df17fbafec8f
children f3ec44f4a53b
line wrap: on
line diff
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -28,9 +28,10 @@ static ngx_int_t ngx_output_chain_copy_b
 ngx_int_t
 ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
 {
-    int           rc, last;
     off_t         bsize;
     size_t        size;
+    ngx_int_t     rc, last;
+    ngx_uint_t    recycled;
     ngx_chain_t  *cl, *out, **last_out;
 
     if (ctx->in == NULL && ctx->busy == NULL) {
@@ -131,6 +132,7 @@ ngx_output_chain(ngx_output_chain_ctx_t 
                 } else {
 
                     size = ctx->bufs.size;
+                    recycled = 1;
 
                     if (ctx->in->buf->last_in_chain) {
 
@@ -142,6 +144,7 @@ ngx_output_chain(ngx_output_chain_ctx_t 
                             */
 
                             size = (size_t) bsize;
+                            recycled = 0;
 
                         } else if (ctx->bufs.num == 1
                                    && (bsize < (off_t) (ctx->bufs.size
@@ -154,6 +157,7 @@ ngx_output_chain(ngx_output_chain_ctx_t 
                              */
 
                             size = (size_t) bsize;
+                            recycled = 0;
                         }
                     }
 
@@ -163,7 +167,7 @@ ngx_output_chain(ngx_output_chain_ctx_t 
                     }
 
                     ctx->buf->tag = ctx->tag;
-                    ctx->buf->recycled = 1;
+                    ctx->buf->recycled = recycled;
                     ctx->allocated++;
                 }
             }