aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-05-08 14:31:59 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-05-08 14:31:59 +0000
commit8bb39121fc66b35c83132fe2c05dd5b995daeecf (patch)
tree397cce0547bad88ed1c75d79e0a857e31c6085a0 /src/http/ngx_http_core_module.c
parentfd4191845b62a9bc7ad0cf23d6e64866dbc5e0f6 (diff)
downloadnginx-8bb39121fc66b35c83132fe2c05dd5b995daeecf.tar.gz
nginx-8bb39121fc66b35c83132fe2c05dd5b995daeecf.zip
test already destroyed request
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c14
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 4b300dfd5..73d7af969 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1652,16 +1652,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;