aboutsummaryrefslogtreecommitdiff
path: root/src/event/ngx_event_pipe.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-12-05 13:18:09 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-12-05 13:18:09 +0000
commitd3283ff9224a41a1a24c2d89f671811c0747480a (patch)
treee122c436f72f587622e8ec0e75632434045e330d /src/event/ngx_event_pipe.c
parent0624ed3d7eaa1995d9e5ec4292bd1eccda09cafc (diff)
downloadnginx-release-0.3.13.tar.gz
nginx-release-0.3.13.zip
nginx-0.3.13-RELEASE importrelease-0.3.13
*) 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.
Diffstat (limited to 'src/event/ngx_event_pipe.c')
-rw-r--r--src/event/ngx_event_pipe.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c
index 779ec1867..0c499a831 100644
--- 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_pipe_t *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_event_pipe_t *p)
}
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_event_pipe_t *p)
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;
}