Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 334:af451db3fe99
nginx-0.0.3-2004-05-12-09:37:55 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 12 May 2004 05:37:55 +0000 |
parents | 8733703a37f3 |
children | d4241d7787fe |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -658,6 +658,27 @@ int ngx_http_send_header(ngx_http_reques } +ngx_int_t ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in) +{ + ngx_int_t rc; + + if (r->connection->write->error) { + return NGX_ERROR; + } + + rc = ngx_http_top_body_filter(r, in); + + if (rc == NGX_ERROR) { + + /* NGX_ERROR could be returned by any filter */ + + r->connection->write->error = 1; + } + + return rc; +} + + int ngx_http_redirect(ngx_http_request_t *r, int redirect) { /* STUB */