test already destroyed request
Igor Sysoev
13 years ago
1651 | 1651 | ngx_int_t |
1652 | 1652 | ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in) |
1653 | 1653 | { |
1654 | ngx_int_t rc; | |
1655 | ||
1656 | ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | |
1654 | ngx_int_t rc; | |
1655 | ngx_connection_t *c; | |
1656 | ||
1657 | c = r->connection; | |
1658 | ||
1659 | ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, | |
1657 | 1660 | "http output filter \"%V?%V\"", &r->uri, &r->args); |
1658 | 1661 | |
1659 | 1662 | rc = ngx_http_top_body_filter(r, in); |
1660 | 1663 | |
1661 | 1664 | if (rc == NGX_ERROR) { |
1665 | ||
1666 | if (c->destroyed) { | |
1667 | return NGX_DONE; | |
1668 | } | |
1669 | ||
1662 | 1670 | /* NGX_ERROR may be returned by any filter */ |
1663 | r->connection->error = 1; | |
1671 | c->error = 1; | |
1664 | 1672 | } |
1665 | 1673 | |
1666 | 1674 | return rc; |