# HG changeset patch # User Igor Sysoev # Date 1214484337 0 # Node ID 2bb4441a8c283320f63de6bd5d6cb97ddd3d516e # Parent 520cb18b64fbfc170e1a7ab2f72d95a46764b288 fix bug when inactive subrequest is truncated, if output_buffers are less than subrequest size diff --git a/src/http/ngx_http_postpone_filter_module.c b/src/http/ngx_http_postpone_filter_module.c --- a/src/http/ngx_http_postpone_filter_module.c +++ b/src/http/ngx_http_postpone_filter_module.c @@ -168,7 +168,7 @@ ngx_http_postpone_filter_output_postpone pr = r->postponed; if (pr == NULL) { - return NGX_OK; + break; } if (pr->request) { @@ -196,7 +196,7 @@ ngx_http_postpone_filter_output_postpone } if (pr == NULL) { - return NGX_OK; + break; } out = pr->out; @@ -215,6 +215,17 @@ ngx_http_postpone_filter_output_postpone r->postponed = r->postponed->next; } + + if (r->out) { + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "http postpone filter out again \"%V?%V\"", + &r->uri, &r->args); + + r->connection->data = r; + return NGX_AGAIN; + } + + return NGX_OK; }