Welcome! Log In Create A New Profile

Advanced

[nginx] Postpone filter: handled ngx_http_postpone_filter_add() failures.

Sergey Kandaurov
October 16, 2017 06:26AM
details: http://hg.nginx.org/nginx/rev/d87f29d764ce
branches:
changeset: 7134:d87f29d764ce
user: Sergey Kandaurov <pluknet@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 {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Postpone filter: handled ngx_http_postpone_filter_add() failures.

Sergey Kandaurov 820 October 16, 2017 06:26AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready