comparison src/http/ngx_http_core_module.c @ 2820:5eb4e2d2e9fa

test already destroyed request
author Igor Sysoev <igor@sysoev.ru>
date Fri, 08 May 2009 14:31:59 +0000
parents d478379e51ac
children faafc084a7a4
comparison
equal deleted inserted replaced
2819:43fe53832da7 2820:5eb4e2d2e9fa
1650 1650
1651 1651
1652 ngx_int_t 1652 ngx_int_t
1653 ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in) 1653 ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in)
1654 { 1654 {
1655 ngx_int_t rc; 1655 ngx_int_t rc;
1656 1656 ngx_connection_t *c;
1657 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 1657
1658 c = r->connection;
1659
1660 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
1658 "http output filter \"%V?%V\"", &r->uri, &r->args); 1661 "http output filter \"%V?%V\"", &r->uri, &r->args);
1659 1662
1660 rc = ngx_http_top_body_filter(r, in); 1663 rc = ngx_http_top_body_filter(r, in);
1661 1664
1662 if (rc == NGX_ERROR) { 1665 if (rc == NGX_ERROR) {
1666
1667 if (c->destroyed) {
1668 return NGX_DONE;
1669 }
1670
1663 /* NGX_ERROR may be returned by any filter */ 1671 /* NGX_ERROR may be returned by any filter */
1664 r->connection->error = 1; 1672 c->error = 1;
1665 } 1673 }
1666 1674
1667 return rc; 1675 return rc;
1668 } 1676 }
1669 1677