Mercurial > hg > nginx
changeset 7134:d87f29d764ce
Postpone filter: handled ngx_http_postpone_filter_add() failures.
In particular, if ngx_http_postpone_filter_add() fails in ngx_chain_add_copy(),
the output chain of the postponed request was left in an invalid state.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 16 Oct 2017 13:13:25 +0300 |
parents | dc3b3cfd5d23 |
children | 9ef704d8563a |
files | src/http/ngx_http_postpone_filter_module.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_postpone_filter_module.c Fri Oct 13 00:32:26 2017 +0300 +++ b/src/http/ngx_http_postpone_filter_module.c Mon Oct 16 13:13:25 2017 +0300 @@ -63,7 +63,10 @@ if (r != c->data) { if (in) { - ngx_http_postpone_filter_add(r, in); + if (ngx_http_postpone_filter_add(r, in) != NGX_OK) { + return NGX_ERROR; + } + return NGX_OK; } @@ -86,7 +89,9 @@ } if (in) { - ngx_http_postpone_filter_add(r, in); + if (ngx_http_postpone_filter_add(r, in) != NGX_OK) { + return NGX_ERROR; + } } do {