Mercurial > hg > nginx-quic
comparison 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 |
comparison
equal
deleted
inserted
replaced
141:656d468f4ead | 142:cb77c084acdb |
---|---|
70 | 70 |
71 | 71 |
72 #define ngx_next_filter (*ngx_http_top_body_filter) | 72 #define ngx_next_filter (*ngx_http_top_body_filter) |
73 | 73 |
74 #define need_to_copy(r, hunk) \ | 74 #define need_to_copy(r, hunk) \ |
75 (((r->filter & NGX_HTTP_FILTER_NEED_IN_MEMORY) \ | 75 (!ngx_hunk_special(hunk) \ |
76 && (hunk->type & NGX_HUNK_IN_MEMORY) == 0) \ | 76 && (((r->filter & NGX_HTTP_FILTER_NEED_IN_MEMORY) \ |
77 || ((r->filter & NGX_HTTP_FILTER_NEED_TEMP) \ | 77 && (hunk->type & NGX_HUNK_IN_MEMORY) == 0) \ |
78 && (hunk->type & (NGX_HUNK_MEMORY|NGX_HUNK_MMAP)))) | 78 || ((r->filter & NGX_HTTP_FILTER_NEED_TEMP) \ |
79 && (hunk->type & (NGX_HUNK_MEMORY|NGX_HUNK_MMAP))))) | |
79 | 80 |
80 | 81 |
81 | 82 |
82 int ngx_http_output_filter(ngx_http_request_t *r, ngx_hunk_t *hunk) | 83 int ngx_http_output_filter(ngx_http_request_t *r, ngx_hunk_t *hunk) |
83 { | 84 { |
199 | 200 |
200 ngx_add_hunk_to_chain(ce, ctx->hunk, r->pool, NGX_ERROR); | 201 ngx_add_hunk_to_chain(ce, ctx->hunk, r->pool, NGX_ERROR); |
201 *ctx->last_out = ce; | 202 *ctx->last_out = ce; |
202 ctx->last_out = &ce->next; | 203 ctx->last_out = &ce->next; |
203 ctx->hunk = NULL; | 204 ctx->hunk = NULL; |
205 | |
206 break; | |
204 } | 207 } |
205 | 208 |
206 if (ctx->out == NULL && last != NGX_NONE) { | 209 if (ctx->out == NULL && last != NGX_NONE) { |
207 return last; | 210 return last; |
208 } | 211 } |