diff src/http/ngx_http_output_filter.c @ 142:cb77c084acdb

nginx-0.0.1-2003-10-09-11:00:45 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 09 Oct 2003 07:00:45 +0000
parents 656d468f4ead
children 5526213be452
line wrap: on
line diff
--- a/src/http/ngx_http_output_filter.c
+++ b/src/http/ngx_http_output_filter.c
@@ -72,10 +72,11 @@ ngx_module_t  ngx_http_output_filter_mod
 #define ngx_next_filter  (*ngx_http_top_body_filter)
 
 #define need_to_copy(r, hunk)                                             \
-            (((r->filter & NGX_HTTP_FILTER_NEED_IN_MEMORY)                \
-               && (hunk->type & NGX_HUNK_IN_MEMORY) == 0)                 \
-             || ((r->filter & NGX_HTTP_FILTER_NEED_TEMP)                  \
-                  && (hunk->type & (NGX_HUNK_MEMORY|NGX_HUNK_MMAP))))
+            (!ngx_hunk_special(hunk)                                      \
+             && (((r->filter & NGX_HTTP_FILTER_NEED_IN_MEMORY)            \
+                   && (hunk->type & NGX_HUNK_IN_MEMORY) == 0)             \
+                 || ((r->filter & NGX_HTTP_FILTER_NEED_TEMP)              \
+                  && (hunk->type & (NGX_HUNK_MEMORY|NGX_HUNK_MMAP)))))
 
 
 
@@ -201,6 +202,8 @@ int ngx_http_output_filter(ngx_http_requ
             *ctx->last_out = ce;
             ctx->last_out = &ce->next;
             ctx->hunk = NULL;
+
+            break;
         }
 
         if (ctx->out == NULL && last != NGX_NONE) {