Mercurial > hg > nginx-vendor-0-8
diff src/event/ngx_event_pipe.c @ 346:05693816539c NGINX_0_6_17
nginx 0.6.17
*) Feature: the "If-Range" request header line support.
Thanks to Alexander V. Inyukhin.
*) Bugfix: URL double escaping in a redirect of the "msie_refresh"
directive; bug appeared in 0.6.4.
*) Bugfix: the "autoindex" directive did not work with the "alias /"
directive.
*) Bugfix: a segmentation fault might occur in worker process if
subrequests were used.
*) Bugfix: the big responses may be transferred truncated if SSL and
gzip were used.
*) Bugfix: the $status variable was equal to 0 if a proxied server
returned response in HTTP/0.9 version.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 15 Nov 2007 00:00:00 +0300 |
parents | eae74a780a84 |
children | 820f6378fc00 |
line wrap: on
line diff
--- a/src/event/ngx_event_pipe.c +++ b/src/event/ngx_event_pipe.c @@ -421,6 +421,7 @@ ngx_event_pipe_write_to_downstream(ngx_e { u_char *prev; size_t bsize; + ngx_int_t rc; ngx_uint_t flush, prev_last_shadow; ngx_chain_t *out, **ll, *cl; ngx_connection_t *downstream; @@ -451,7 +452,13 @@ ngx_event_pipe_write_to_downstream(ngx_e cl->buf->recycled = 0; } - if (p->output_filter(p->output_ctx, p->out) == NGX_ERROR) { + rc = p->output_filter(p->output_ctx, p->out); + + if (downstream->destroyed) { + return NGX_ABORT; + } + + if (rc == NGX_ERROR) { p->downstream_error = 1; return ngx_event_pipe_drain_chains(p); } @@ -467,12 +474,13 @@ ngx_event_pipe_write_to_downstream(ngx_e cl->buf->recycled = 0; } - if (p->output_filter(p->output_ctx, p->in) == NGX_ERROR) { + rc = p->output_filter(p->output_ctx, p->in); - if (downstream->destroyed) { - return NGX_ABORT; - } + if (downstream->destroyed) { + return NGX_ABORT; + } + if (rc == NGX_ERROR) { p->downstream_error = 1; return ngx_event_pipe_drain_chains(p); } @@ -602,7 +610,13 @@ ngx_event_pipe_write_to_downstream(ngx_e break; } - if (p->output_filter(p->output_ctx, out) == NGX_ERROR) { + rc = p->output_filter(p->output_ctx, out); + + if (downstream->destroyed) { + return NGX_ABORT; + } + + if (rc == NGX_ERROR) { p->downstream_error = 1; return ngx_event_pipe_drain_chains(p); }