[nginx] Postpone filter: handled ngx_http_postpone_filter_add() failures.
Sergey Kandaurov
pluknet at nginx.com
Mon Oct 16 10:24:11 UTC 2017
details: http://hg.nginx.org/nginx/rev/d87f29d764ce
branches:
changeset: 7134:d87f29d764ce
user: Sergey Kandaurov <pluknet at nginx.com>
date: Mon Oct 16 13:13:25 2017 +0300
description:
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.
diffstat:
src/http/ngx_http_postpone_filter_module.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r dc3b3cfd5d23 -r d87f29d764ce src/http/ngx_http_postpone_filter_module.c
--- 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 @@ ngx_http_postpone_filter(ngx_http_reques
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 @@ ngx_http_postpone_filter(ngx_http_reques
}
if (in) {
- ngx_http_postpone_filter_add(r, in);
+ if (ngx_http_postpone_filter_add(r, in) != NGX_OK) {
+ return NGX_ERROR;
+ }
}
do {
More information about the nginx-devel
mailing list