mirror of
https://github.com/nginx/nginx.git
synced 2025-06-08 02:02:38 +08:00
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.
This commit is contained in:
parent
77c7875a7b
commit
fdbf551602
@ -63,7 +63,10 @@ ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
if (r != c->data) {
|
if (r != c->data) {
|
||||||
|
|
||||||
if (in) {
|
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;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +89,9 @@ ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (in) {
|
if (in) {
|
||||||
ngx_http_postpone_filter_add(r, in);
|
if (ngx_http_postpone_filter_add(r, in) != NGX_OK) {
|
||||||
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user