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);
rc = p->output_filter(p->output_ctx, p->in);
- if (downstream->destroyed) {
- return NGX_ABORT;
- }
-
if (rc == NGX_ERROR) {
p->downstream_error = 1;
return ngx_event_pipe_drain_chains(p);
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);
SPAGAIN;
- if (c->destroyed) {
- PUTBACK;
-
- FREETMPS;
- LEAVE;
-
- return NGX_DONE;
- }
-
if (n) {
if (rv == NULL) {
status = POPi;
rc = ngx_output_chain(ctx, in);
- if (!c->destroyed) {
+ if (ctx->in == NULL) {
+ r->buffered &= ~NGX_HTTP_COPY_BUFFERED;
- if (ctx->in == NULL) {
- r->buffered &= ~NGX_HTTP_COPY_BUFFERED;
- } else {
- r->buffered |= NGX_HTTP_COPY_BUFFERED;
- }
-
- ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "copy filter: %i \"%V?%V\"", rc, &r->uri, &r->args);
+ } else {
+ r->buffered |= NGX_HTTP_COPY_BUFFERED;
}
+ ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "copy filter: %i \"%V?%V\"", rc, &r->uri, &r->args);
+
return rc;
}
rc = ngx_http_top_body_filter(r, in);
if (rc == NGX_ERROR) {
-
- if (c->destroyed) {
- return NGX_DONE;
- }
-
/* NGX_ERROR may be returned by any filter */
c->error = 1;
}
ngx_del_timer(c->write);
}
- if (c->destroyed) {
- return;
- }
-
if (c->read->eof) {
ngx_http_close_request(r, 0);
return;
rc = ngx_http_output_filter(r, NULL);
- if (c->destroyed) {
- return;
- }
-
ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http writer output filter: %d, \"%V?%V\"",
rc, &r->uri, &r->args);
if (u->out_bufs || u->busy_bufs) {
rc = ngx_http_output_filter(r, u->out_bufs);
- if (downstream->destroyed) {
- return;
- }
-
if (rc == NGX_ERROR) {
ngx_http_upstream_finalize_request(r, u, 0);
return;
}
if (ngx_event_pipe(p, wev->write) == NGX_ABORT) {
-
- if (c->destroyed) {
- return;
- }
-
ngx_http_upstream_finalize_request(r, u, 0);
return;
}
}
if (ngx_event_pipe(p, 1) == NGX_ABORT) {
-
- if (c->destroyed) {
- return;
- }
-
ngx_http_upstream_finalize_request(r, u, 0);
return;
}
ngx_connection_error(c, NGX_ETIMEDOUT, "upstream timed out");
} else {
- c = r->connection;
-
if (ngx_event_pipe(u->pipe, 0) == NGX_ABORT) {
-
- if (c->destroyed) {
- return;
- }
-
ngx_http_upstream_finalize_request(r, u, 0);
return;
}