comparison src/http/ngx_http_postpone_filter_module.c @ 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 f026adb935ad
children 20f139e9ffa8
comparison
equal deleted inserted replaced
7133:dc3b3cfd5d23 7134:d87f29d764ce
61 "http postpone filter \"%V?%V\" %p", &r->uri, &r->args, in); 61 "http postpone filter \"%V?%V\" %p", &r->uri, &r->args, in);
62 62
63 if (r != c->data) { 63 if (r != c->data) {
64 64
65 if (in) { 65 if (in) {
66 ngx_http_postpone_filter_add(r, in); 66 if (ngx_http_postpone_filter_add(r, in) != NGX_OK) {
67 return NGX_ERROR;
68 }
69
67 return NGX_OK; 70 return NGX_OK;
68 } 71 }
69 72
70 #if 0 73 #if 0
71 /* TODO: SSI may pass NULL */ 74 /* TODO: SSI may pass NULL */
84 87
85 return NGX_OK; 88 return NGX_OK;
86 } 89 }
87 90
88 if (in) { 91 if (in) {
89 ngx_http_postpone_filter_add(r, in); 92 if (ngx_http_postpone_filter_add(r, in) != NGX_OK) {
93 return NGX_ERROR;
94 }
90 } 95 }
91 96
92 do { 97 do {
93 pr = r->postponed; 98 pr = r->postponed;
94 99