Mercurial > hg > nginx
diff src/event/ngx_event_pipe.c @ 583:4e296b7d25bf release-0.3.13
nginx-0.3.13-RELEASE import
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS.
*) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and
/dev/poll methods.
*) Bugfix: in SSI handling.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
*) Bugfix: the "auth_basic" directive did not disable the
authorization; the bug had appeared in 0.3.11.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 05 Dec 2005 13:18:09 +0000 |
parents | 326634fb9d47 |
children | 284cc140593b |
line wrap: on
line diff
--- a/src/event/ngx_event_pipe.c +++ b/src/event/ngx_event_pipe.c @@ -407,12 +407,15 @@ ngx_event_pipe_read_upstream(ngx_event_p static ngx_int_t ngx_event_pipe_write_to_downstream(ngx_event_pipe_t *p) { - size_t bsize; - ngx_uint_t flush; - ngx_chain_t *out, **ll, *cl; + size_t bsize; + ngx_uint_t flush; + ngx_chain_t *out, **ll, *cl; + ngx_connection_t *downstream; + + downstream = p->downstream; ngx_log_debug1(NGX_LOG_DEBUG_EVENT, p->log, 0, - "pipe write downstream: %d", p->downstream->write->ready); + "pipe write downstream: %d", downstream->write->ready); for ( ;; ) { if (p->downstream_error) { @@ -452,6 +455,11 @@ ngx_event_pipe_write_to_downstream(ngx_e } if (p->output_filter(p->output_ctx, p->in) == NGX_ERROR) { + + if (downstream->destroyed) { + return NGX_ABORT; + } + p->downstream_error = 1; return ngx_event_pipe_drain_chains(p); } @@ -468,9 +476,9 @@ ngx_event_pipe_write_to_downstream(ngx_e break; } - if (p->downstream->data != p->output_ctx - || !p->downstream->write->ready - || p->downstream->write->delayed) + if (downstream->data != p->output_ctx + || !downstream->write->ready + || downstream->write->delayed) { break; }