[nginx] Upstream: fixed unbuffered processing to flush postponed...
Maxim Dounin
mdounin at mdounin.ru
Fri Aug 28 12:07:18 UTC 2026
details: http://freenginx.org/hg/nginx/rev/94baae874afd
branches:
changeset: 9585:94baae874afd
user: Maxim Dounin <mdounin at mdounin.ru>
date: Fri Aug 28 14:56:47 2026 +0300
description:
Upstream: fixed unbuffered processing to flush postponed data.
Previously, ngx_http_upstream_process_non_buffered_request() only called
the output body filter chain if there are any output or busy buffers, or
if there are connection-level buffered data (that is, if we weren't able
to send all the data to the client). However, this might not be enough
when there are data postponed by the postpone filter due to other
subrequests: data postponed due to a subrequest were not sent after a
subrequest finalization and a parent request wakeup if there were no
busy buffers, which could be the case with gunzip.
The fix is to check r->postponed when calling ngx_http_output_filter().
diffstat:
src/http/ngx_http_upstream.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -3834,7 +3834,9 @@ ngx_http_upstream_process_non_buffered_r
if (do_write) {
- if (u->out_bufs || u->busy_bufs || downstream->buffered) {
+ if (u->out_bufs || u->busy_bufs || downstream->buffered
+ || r->postponed)
+ {
rc = ngx_http_output_filter(r, u->out_bufs);
if (rc == NGX_ERROR) {
More information about the nginx-devel
mailing list