comparison src/http/ngx_http_core_module.c @ 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 87e1fcd9b604
children 0ea35a84c72d
comparison
equal deleted inserted replaced
2866:1804da35f853 2867:7a10334d4bce
1555 1555
1556 1556
1557 ngx_int_t 1557 ngx_int_t
1558 ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in) 1558 ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in)
1559 { 1559 {
1560 ngx_int_t rc; 1560 ngx_int_t rc;
1561 1561 ngx_connection_t *c;
1562 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 1562
1563 c = r->connection;
1564
1565 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
1563 "http output filter \"%V?%V\"", &r->uri, &r->args); 1566 "http output filter \"%V?%V\"", &r->uri, &r->args);
1564 1567
1565 rc = ngx_http_top_body_filter(r, in); 1568 rc = ngx_http_top_body_filter(r, in);
1566 1569
1567 if (rc == NGX_ERROR) { 1570 if (rc == NGX_ERROR) {
1571
1572 if (c->destroyed) {
1573 return NGX_DONE;
1574 }
1575
1568 /* NGX_ERROR may be returned by any filter */ 1576 /* NGX_ERROR may be returned by any filter */
1569 r->connection->error = 1; 1577 c->error = 1;
1570 } 1578 }
1571 1579
1572 return rc; 1580 return rc;
1573 } 1581 }
1574 1582