diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-05-18 16:19:49 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-05-18 16:19:49 +0000 |
commit | 82e31bf947d706ac579896f5aff92bef0358dcf5 (patch) | |
tree | 9a431d66db4199b68a32ccd77852e45e1ce611c3 | |
parent | c0399e22bb3f1ec7b7074cf078b0146cbb57d448 (diff) | |
download | nginx-82e31bf947d706ac579896f5aff92bef0358dcf5.tar.gz nginx-82e31bf947d706ac579896f5aff92bef0358dcf5.zip |
r2821 merge:
test already destroyed request
-rw-r--r-- | src/http/ngx_http_core_module.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index cfc649299..c312a05f7 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1557,16 +1557,24 @@ ngx_http_send_header(ngx_http_request_t *r) ngx_int_t ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in) { - ngx_int_t rc; + ngx_int_t rc; + ngx_connection_t *c; - ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + 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; |