Gzip: clearing of c->buffered if all data are flushed.
This allows to finalize unfinished responses while still sending as
much data as available.
Maxim Dounin
9 years ago
367 | 367 | if (ngx_chain_add_copy(r->pool, &ctx->in, in) != NGX_OK) { |
368 | 368 | goto failed; |
369 | 369 | } |
370 | ||
371 | r->connection->buffered |= NGX_HTTP_GZIP_BUFFERED; | |
370 | 372 | } |
371 | 373 | |
372 | 374 | if (ctx->nomem) { |
619 | 621 | return NGX_ERROR; |
620 | 622 | } |
621 | 623 | |
622 | r->connection->buffered |= NGX_HTTP_GZIP_BUFFERED; | |
623 | ||
624 | 624 | ctx->last_out = &ctx->out; |
625 | 625 | ctx->crc32 = crc32(0L, Z_NULL, 0); |
626 | 626 | ctx->flush = Z_NO_FLUSH; |
852 | 852 | cl->next = NULL; |
853 | 853 | *ctx->last_out = cl; |
854 | 854 | ctx->last_out = &cl->next; |
855 | ||
856 | r->connection->buffered &= ~NGX_HTTP_GZIP_BUFFERED; | |
855 | 857 | |
856 | 858 | return NGX_OK; |
857 | 859 | } |