Mercurial > hg > nginx
comparison src/http/modules/ngx_http_sub_filter_module.c @ 5286:819c5b53d8b5
Sub filter: flush buffers handling.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 25 Jul 2013 14:54:47 +0400 |
parents | d47ef93134e5 |
children | 2dbc5e38b65d |
comparison
equal
deleted
inserted
replaced
5285:d47ef93134e5 | 5286:819c5b53d8b5 |
---|---|
367 ctx->once = slcf->once; | 367 ctx->once = slcf->once; |
368 | 368 |
369 continue; | 369 continue; |
370 } | 370 } |
371 | 371 |
372 if (ctx->buf->last_buf || ngx_buf_in_memory(ctx->buf)) { | 372 if (ctx->buf->last_buf || ctx->buf->flush |
373 || ngx_buf_in_memory(ctx->buf)) | |
374 { | |
373 if (b == NULL) { | 375 if (b == NULL) { |
374 cl = ngx_chain_get_free_buf(r->pool, &ctx->free); | 376 cl = ngx_chain_get_free_buf(r->pool, &ctx->free); |
375 if (cl == NULL) { | 377 if (cl == NULL) { |
376 return NGX_ERROR; | 378 return NGX_ERROR; |
377 } | 379 } |
385 *ctx->last_out = cl; | 387 *ctx->last_out = cl; |
386 ctx->last_out = &cl->next; | 388 ctx->last_out = &cl->next; |
387 } | 389 } |
388 | 390 |
389 b->last_buf = ctx->buf->last_buf; | 391 b->last_buf = ctx->buf->last_buf; |
392 b->flush = ctx->buf->flush; | |
390 b->shadow = ctx->buf; | 393 b->shadow = ctx->buf; |
391 | 394 |
392 b->recycled = ctx->buf->recycled; | 395 b->recycled = ctx->buf->recycled; |
393 } | 396 } |
394 | 397 |