Mercurial > hg > nginx
changeset 2867:7a10334d4bce stable-0.6
r2821 merge:
test already destroyed request
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 18 May 2009 16:19:49 +0000 |
parents | 1804da35f853 |
children | ff9521c5a778 |
files | src/http/ngx_http_core_module.c |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Mon May 18 16:17:51 2009 +0000 +++ b/src/http/ngx_http_core_module.c Mon May 18 16:19:49 2009 +0000 @@ -1557,16 +1557,24 @@ ngx_int_t ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in) { - ngx_int_t rc; - - ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + ngx_int_t rc; + ngx_connection_t *c; + + c = r->connection; + + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, "http output filter \"%V?%V\"", &r->uri, &r->args); rc = ngx_http_top_body_filter(r, in); if (rc == NGX_ERROR) { + + if (c->destroyed) { + return NGX_DONE; + } + /* NGX_ERROR may be returned by any filter */ - r->connection->error = 1; + c->error = 1; } return rc;